var a0=Object.defineProperty;var hp=n=>{throw TypeError(n)};var l0=(n,t,s)=>t in n?a0(n,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):n[t]=s;var Ie=(n,t,s)=>l0(n,typeof t!="symbol"?t+"":t,s),$u=(n,t,s)=>t.has(n)||hp("Cannot "+s);var R=(n,t,s)=>($u(n,t,"read from private field"),s?s.call(n):t.get(n)),pe=(n,t,s)=>t.has(n)?hp("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(n):t.set(n,s),ee=(n,t,s,o)=>($u(n,t,"write to private field"),o?o.call(n,s):t.set(n,s),s),Ae=(n,t,s)=>($u(n,t,"access private method"),s);var Sa=(n,t,s,o)=>({set _(a){ee(n,t,a,s)},get _(){return R(n,t,o)}});function u0(n,t){for(var s=0;so[a]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))o(a);new MutationObserver(a=>{for(const u of a)if(u.type==="childList")for(const d of u.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&o(d)}).observe(document,{childList:!0,subtree:!0});function s(a){const u={};return a.integrity&&(u.integrity=a.integrity),a.referrerPolicy&&(u.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?u.credentials="include":a.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function o(a){if(a.ep)return;a.ep=!0;const u=s(a);fetch(a.href,u)}})();function Wc(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Hu={exports:{}},Fo={},Vu={exports:{}},Ce={};/** * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var pp;function c0(){if(pp)return Ce;pp=1;var n=Symbol.for("react.element"),t=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),d=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),v=Symbol.iterator;function k(P){return P===null||typeof P!="object"?null:(P=v&&P[v]||P["@@iterator"],typeof P=="function"?P:null)}var L={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},M=Object.assign,_={};function x(P,z,ce){this.props=P,this.context=z,this.refs=_,this.updater=ce||L}x.prototype.isReactComponent={},x.prototype.setState=function(P,z){if(typeof P!="object"&&typeof P!="function"&&P!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,P,z,"setState")},x.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function E(){}E.prototype=x.prototype;function I(P,z,ce){this.props=P,this.context=z,this.refs=_,this.updater=ce||L}var A=I.prototype=new E;A.constructor=I,M(A,x.prototype),A.isPureReactComponent=!0;var O=Array.isArray,H=Object.prototype.hasOwnProperty,$={current:null},G={key:!0,ref:!0,__self:!0,__source:!0};function B(P,z,ce){var me,he={},X=null,ve=null;if(z!=null)for(me in z.ref!==void 0&&(ve=z.ref),z.key!==void 0&&(X=""+z.key),z)H.call(z,me)&&!G.hasOwnProperty(me)&&(he[me]=z[me]);var Re=arguments.length-2;if(Re===1)he.children=ce;else if(1>>1,z=K[P];if(0>>1;Pa(he,U))Xa(ve,he)?(K[P]=ve,K[X]=U,P=X):(K[P]=he,K[me]=U,P=me);else if(Xa(ve,U))K[P]=ve,K[X]=U,P=X;else break e}}return ae}function a(K,ae){var U=K.sortIndex-ae.sortIndex;return U!==0?U:K.id-ae.id}if(typeof performance=="object"&&typeof performance.now=="function"){var u=performance;n.unstable_now=function(){return u.now()}}else{var d=Date,h=d.now();n.unstable_now=function(){return d.now()-h}}var p=[],m=[],y=1,v=null,k=3,L=!1,M=!1,_=!1,x=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,I=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function A(K){for(var ae=s(m);ae!==null;){if(ae.callback===null)o(m);else if(ae.startTime<=K)o(m),ae.sortIndex=ae.expirationTime,t(p,ae);else break;ae=s(m)}}function O(K){if(_=!1,A(K),!M)if(s(p)!==null)M=!0,Ee(H);else{var ae=s(m);ae!==null&&_e(O,ae.startTime-K)}}function H(K,ae){M=!1,_&&(_=!1,E(B),B=-1),L=!0;var U=k;try{for(A(ae),v=s(p);v!==null&&(!(v.expirationTime>ae)||K&&!Se());){var P=v.callback;if(typeof P=="function"){v.callback=null,k=v.priorityLevel;var z=P(v.expirationTime<=ae);ae=n.unstable_now(),typeof z=="function"?v.callback=z:v===s(p)&&o(p),A(ae)}else o(p);v=s(p)}if(v!==null)var ce=!0;else{var me=s(m);me!==null&&_e(O,me.startTime-ae),ce=!1}return ce}finally{v=null,k=U,L=!1}}var $=!1,G=null,B=-1,ie=5,ue=-1;function Se(){return!(n.unstable_now()-ueK||125P?(K.sortIndex=U,t(m,K),s(p)===null&&K===s(m)&&(_?(E(B),B=-1):_=!0,_e(O,U-P))):(K.sortIndex=z,t(p,K),M||L||(M=!0,Ee(H))),K},n.unstable_shouldYield=Se,n.unstable_wrapCallback=function(K){var ae=k;return function(){var U=k;k=ae;try{return K.apply(this,arguments)}finally{k=U}}}})(Qu)),Qu}var wp;function p0(){return wp||(wp=1,qu.exports=h0()),qu.exports}/** * @license React * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var xp;function m0(){if(xp)return Tt;xp=1;var n=qc(),t=p0();function s(e){for(var r="https://reactjs.org/docs/error-decoder.html?invariant="+e,i=1;i"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),p=Object.prototype.hasOwnProperty,m=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,y={},v={};function k(e){return p.call(v,e)?!0:p.call(y,e)?!1:m.test(e)?v[e]=!0:(y[e]=!0,!1)}function L(e,r,i,l){if(i!==null&&i.type===0)return!1;switch(typeof r){case"function":case"symbol":return!0;case"boolean":return l?!1:i!==null?!i.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function M(e,r,i,l){if(r===null||typeof r>"u"||L(e,r,i,l))return!0;if(l)return!1;if(i!==null)switch(i.type){case 3:return!r;case 4:return r===!1;case 5:return isNaN(r);case 6:return isNaN(r)||1>r}return!1}function _(e,r,i,l,c,f,g){this.acceptsBooleans=r===2||r===3||r===4,this.attributeName=l,this.attributeNamespace=c,this.mustUseProperty=i,this.propertyName=e,this.type=r,this.sanitizeURL=f,this.removeEmptyString=g}var x={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){x[e]=new _(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var r=e[0];x[r]=new _(r,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){x[e]=new _(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){x[e]=new _(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){x[e]=new _(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){x[e]=new _(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){x[e]=new _(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){x[e]=new _(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){x[e]=new _(e,5,!1,e.toLowerCase(),null,!1,!1)});var E=/[\-:]([a-z])/g;function I(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var r=e.replace(E,I);x[r]=new _(r,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var r=e.replace(E,I);x[r]=new _(r,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var r=e.replace(E,I);x[r]=new _(r,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){x[e]=new _(e,1,!1,e.toLowerCase(),null,!1,!1)}),x.xlinkHref=new _("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){x[e]=new _(e,1,!1,e.toLowerCase(),null,!0,!0)});function A(e,r,i,l){var c=x.hasOwnProperty(r)?x[r]:null;(c!==null?c.type!==0:l||!(2S||c[g]!==f[S]){var C=` `+c[g].replace(" at new "," at ");return e.displayName&&C.includes("")&&(C=C.replace("",e.displayName)),C}while(1<=g&&0<=S);break}}}finally{ce=!1,Error.prepareStackTrace=i}return(e=e?e.displayName||e.name:"")?z(e):""}function he(e){switch(e.tag){case 5:return z(e.type);case 16:return z("Lazy");case 13:return z("Suspense");case 19:return z("SuspenseList");case 0:case 2:case 15:return e=me(e.type,!1),e;case 11:return e=me(e.type.render,!1),e;case 1:return e=me(e.type,!0),e;default:return""}}function X(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case G:return"Fragment";case $:return"Portal";case ie:return"Profiler";case B:return"StrictMode";case xe:return"Suspense";case J:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Se:return(e.displayName||"Context")+".Consumer";case ue:return(e._context.displayName||"Context")+".Provider";case Te:var r=e.render;return e=e.displayName,e||(e=r.displayName||r.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case be:return r=e.displayName||null,r!==null?r:X(e.type)||"Memo";case Ee:r=e._payload,e=e._init;try{return X(e(r))}catch{}}return null}function ve(e){var r=e.type;switch(e.tag){case 24:return"Cache";case 9:return(r.displayName||"Context")+".Consumer";case 10:return(r._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=r.render,e=e.displayName||e.name||"",r.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return r;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return X(r);case 8:return r===B?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r}return null}function Re(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ye(e){var r=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function tt(e){var r=ye(e)?"checked":"value",i=Object.getOwnPropertyDescriptor(e.constructor.prototype,r),l=""+e[r];if(!e.hasOwnProperty(r)&&typeof i<"u"&&typeof i.get=="function"&&typeof i.set=="function"){var c=i.get,f=i.set;return Object.defineProperty(e,r,{configurable:!0,get:function(){return c.call(this)},set:function(g){l=""+g,f.call(this,g)}}),Object.defineProperty(e,r,{enumerable:i.enumerable}),{getValue:function(){return l},setValue:function(g){l=""+g},stopTracking:function(){e._valueTracker=null,delete e[r]}}}}function Dt(e){e._valueTracker||(e._valueTracker=tt(e))}function it(e){if(!e)return!1;var r=e._valueTracker;if(!r)return!0;var i=r.getValue(),l="";return e&&(l=ye(e)?e.checked?"true":"false":e.value),e=l,e!==i?(r.setValue(e),!0):!1}function Gt(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Mt(e,r){var i=r.checked;return U({},r,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:i??e._wrapperState.initialChecked})}function Ut(e,r){var i=r.defaultValue==null?"":r.defaultValue,l=r.checked!=null?r.checked:r.defaultChecked;i=Re(r.value!=null?r.value:i),e._wrapperState={initialChecked:l,initialValue:i,controlled:r.type==="checkbox"||r.type==="radio"?r.checked!=null:r.value!=null}}function we(e,r){r=r.checked,r!=null&&A(e,"checked",r,!1)}function at(e,r){we(e,r);var i=Re(r.value),l=r.type;if(i!=null)l==="number"?(i===0&&e.value===""||e.value!=i)&&(e.value=""+i):e.value!==""+i&&(e.value=""+i);else if(l==="submit"||l==="reset"){e.removeAttribute("value");return}r.hasOwnProperty("value")?Yt(e,r.type,i):r.hasOwnProperty("defaultValue")&&Yt(e,r.type,Re(r.defaultValue)),r.checked==null&&r.defaultChecked!=null&&(e.defaultChecked=!!r.defaultChecked)}function Xt(e,r,i){if(r.hasOwnProperty("value")||r.hasOwnProperty("defaultValue")){var l=r.type;if(!(l!=="submit"&&l!=="reset"||r.value!==void 0&&r.value!==null))return;r=""+e._wrapperState.initialValue,i||r===e.value||(e.value=r),e.defaultValue=r}i=e.name,i!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,i!==""&&(e.name=i)}function Yt(e,r,i){(r!=="number"||Gt(e.ownerDocument)!==e)&&(i==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+i&&(e.defaultValue=""+i))}var Dn=Array.isArray;function Mn(e,r,i,l){if(e=e.options,r){r={};for(var c=0;c"+r.valueOf().toString()+"",r=hi.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;r.firstChild;)e.appendChild(r.firstChild)}});function Xs(e,r){if(r){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=r;return}}e.textContent=r}var Ys={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},dv=["Webkit","ms","Moz","O"];Object.keys(Ys).forEach(function(e){dv.forEach(function(r){r=r+e.charAt(0).toUpperCase()+e.substring(1),Ys[r]=Ys[e]})});function Rd(e,r,i){return r==null||typeof r=="boolean"||r===""?"":i||typeof r!="number"||r===0||Ys.hasOwnProperty(e)&&Ys[e]?(""+r).trim():r+"px"}function Td(e,r){e=e.style;for(var i in r)if(r.hasOwnProperty(i)){var l=i.indexOf("--")===0,c=Rd(i,r[i],l);i==="float"&&(i="cssFloat"),l?e.setProperty(i,c):e[i]=c}}var fv=U({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function el(e,r){if(r){if(fv[e]&&(r.children!=null||r.dangerouslySetInnerHTML!=null))throw Error(s(137,e));if(r.dangerouslySetInnerHTML!=null){if(r.children!=null)throw Error(s(60));if(typeof r.dangerouslySetInnerHTML!="object"||!("__html"in r.dangerouslySetInnerHTML))throw Error(s(61))}if(r.style!=null&&typeof r.style!="object")throw Error(s(62))}}function tl(e,r){if(e.indexOf("-")===-1)return typeof r.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var nl=null;function rl(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var sl=null,ss=null,os=null;function Ad(e){if(e=xo(e)){if(typeof sl!="function")throw Error(s(280));var r=e.stateNode;r&&(r=ji(r),sl(e.stateNode,e.type,r))}}function Pd(e){ss?os?os.push(e):os=[e]:ss=e}function Nd(){if(ss){var e=ss,r=os;if(os=ss=null,Ad(e),r)for(e=0;e>>=0,e===0?32:31-(bv(e)/_v|0)|0}var vi=64,wi=4194304;function to(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function xi(e,r){var i=e.pendingLanes;if(i===0)return 0;var l=0,c=e.suspendedLanes,f=e.pingedLanes,g=i&268435455;if(g!==0){var S=g&~c;S!==0?l=to(S):(f&=g,f!==0&&(l=to(f)))}else g=i&~c,g!==0?l=to(g):f!==0&&(l=to(f));if(l===0)return 0;if(r!==0&&r!==l&&(r&c)===0&&(c=l&-l,f=r&-r,c>=f||c===16&&(f&4194240)!==0))return r;if((l&4)!==0&&(l|=i&16),r=e.entangledLanes,r!==0)for(e=e.entanglements,r&=l;0i;i++)r.push(e);return r}function no(e,r,i){e.pendingLanes|=r,r!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,r=31-Jt(r),e[r]=i}function Tv(e,r){var i=e.pendingLanes&~r;e.pendingLanes=r,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=r,e.mutableReadLanes&=r,e.entangledLanes&=r,r=e.entanglements;var l=e.eventTimes;for(e=e.expirationTimes;0=co),of=" ",af=!1;function lf(e,r){switch(e){case"keyup":return nw.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function uf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ls=!1;function sw(e,r){switch(e){case"compositionend":return uf(r);case"keypress":return r.which!==32?null:(af=!0,of);case"textInput":return e=r.data,e===of&&af?null:e;default:return null}}function ow(e,r){if(ls)return e==="compositionend"||!El&&lf(e,r)?(e=Zd(),ki=gl=Hn=null,ls=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1=r)return{node:i,offset:r-e};e=l}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=gf(i)}}function vf(e,r){return e&&r?e===r?!0:e&&e.nodeType===3?!1:r&&r.nodeType===3?vf(e,r.parentNode):"contains"in e?e.contains(r):e.compareDocumentPosition?!!(e.compareDocumentPosition(r)&16):!1:!1}function wf(){for(var e=window,r=Gt();r instanceof e.HTMLIFrameElement;){try{var i=typeof r.contentWindow.location.href=="string"}catch{i=!1}if(i)e=r.contentWindow;else break;r=Gt(e.document)}return r}function kl(e){var r=e&&e.nodeName&&e.nodeName.toLowerCase();return r&&(r==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||r==="textarea"||e.contentEditable==="true")}function pw(e){var r=wf(),i=e.focusedElem,l=e.selectionRange;if(r!==i&&i&&i.ownerDocument&&vf(i.ownerDocument.documentElement,i)){if(l!==null&&kl(i)){if(r=l.start,e=l.end,e===void 0&&(e=r),"selectionStart"in i)i.selectionStart=r,i.selectionEnd=Math.min(e,i.value.length);else if(e=(r=i.ownerDocument||document)&&r.defaultView||window,e.getSelection){e=e.getSelection();var c=i.textContent.length,f=Math.min(l.start,c);l=l.end===void 0?f:Math.min(l.end,c),!e.extend&&f>l&&(c=l,l=f,f=c),c=yf(i,f);var g=yf(i,l);c&&g&&(e.rangeCount!==1||e.anchorNode!==c.node||e.anchorOffset!==c.offset||e.focusNode!==g.node||e.focusOffset!==g.offset)&&(r=r.createRange(),r.setStart(c.node,c.offset),e.removeAllRanges(),f>l?(e.addRange(r),e.extend(g.node,g.offset)):(r.setEnd(g.node,g.offset),e.addRange(r)))}}for(r=[],e=i;e=e.parentNode;)e.nodeType===1&&r.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof i.focus=="function"&&i.focus(),i=0;i=document.documentMode,us=null,Cl=null,mo=null,Rl=!1;function xf(e,r,i){var l=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;Rl||us==null||us!==Gt(l)||(l=us,"selectionStart"in l&&kl(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),mo&&po(mo,l)||(mo=l,l=Li(Cl,"onSelect"),0ps||(e.current=Ul[ps],Ul[ps]=null,ps--)}function Me(e,r){ps++,Ul[ps]=e.current,e.current=r}var Qn={},ht=qn(Qn),bt=qn(!1),br=Qn;function ms(e,r){var i=e.type.contextTypes;if(!i)return Qn;var l=e.stateNode;if(l&&l.__reactInternalMemoizedUnmaskedChildContext===r)return l.__reactInternalMemoizedMaskedChildContext;var c={},f;for(f in i)c[f]=r[f];return l&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=r,e.__reactInternalMemoizedMaskedChildContext=c),c}function _t(e){return e=e.childContextTypes,e!=null}function Di(){ze(bt),ze(ht)}function Ff(e,r,i){if(ht.current!==Qn)throw Error(s(168));Me(ht,r),Me(bt,i)}function jf(e,r,i){var l=e.stateNode;if(r=r.childContextTypes,typeof l.getChildContext!="function")return i;l=l.getChildContext();for(var c in l)if(!(c in r))throw Error(s(108,ve(e)||"Unknown",c));return U({},i,l)}function Mi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Qn,br=ht.current,Me(ht,e),Me(bt,bt.current),!0}function Df(e,r,i){var l=e.stateNode;if(!l)throw Error(s(169));i?(e=jf(e,r,br),l.__reactInternalMemoizedMergedChildContext=e,ze(bt),ze(ht),Me(ht,e)):ze(bt),Me(bt,i)}var kn=null,Ui=!1,zl=!1;function Mf(e){kn===null?kn=[e]:kn.push(e)}function Cw(e){Ui=!0,Mf(e)}function Kn(){if(!zl&&kn!==null){zl=!0;var e=0,r=je;try{var i=kn;for(je=1;e>=g,c-=g,Cn=1<<32-Jt(r)+c|i<ge?(st=fe,fe=null):st=fe.sibling;var Le=V(F,fe,j[ge],Q);if(Le===null){fe===null&&(fe=st);break}e&&fe&&Le.alternate===null&&r(F,fe),T=f(Le,T,ge),de===null?le=Le:de.sibling=Le,de=Le,fe=st}if(ge===j.length)return i(F,fe),Be&&kr(F,ge),le;if(fe===null){for(;gege?(st=fe,fe=null):st=fe.sibling;var rr=V(F,fe,Le.value,Q);if(rr===null){fe===null&&(fe=st);break}e&&fe&&rr.alternate===null&&r(F,fe),T=f(rr,T,ge),de===null?le=rr:de.sibling=rr,de=rr,fe=st}if(Le.done)return i(F,fe),Be&&kr(F,ge),le;if(fe===null){for(;!Le.done;ge++,Le=j.next())Le=q(F,Le.value,Q),Le!==null&&(T=f(Le,T,ge),de===null?le=Le:de.sibling=Le,de=Le);return Be&&kr(F,ge),le}for(fe=l(F,fe);!Le.done;ge++,Le=j.next())Le=Z(fe,F,ge,Le.value,Q),Le!==null&&(e&&Le.alternate!==null&&fe.delete(Le.key===null?ge:Le.key),T=f(Le,T,ge),de===null?le=Le:de.sibling=Le,de=Le);return e&&fe.forEach(function(i0){return r(F,i0)}),Be&&kr(F,ge),le}function Qe(F,T,j,Q){if(typeof j=="object"&&j!==null&&j.type===G&&j.key===null&&(j=j.props.children),typeof j=="object"&&j!==null){switch(j.$$typeof){case H:e:{for(var le=j.key,de=T;de!==null;){if(de.key===le){if(le=j.type,le===G){if(de.tag===7){i(F,de.sibling),T=c(de,j.props.children),T.return=F,F=T;break e}}else if(de.elementType===le||typeof le=="object"&&le!==null&&le.$$typeof===Ee&&Vf(le)===de.type){i(F,de.sibling),T=c(de,j.props),T.ref=So(F,de,j),T.return=F,F=T;break e}i(F,de);break}else r(F,de);de=de.sibling}j.type===G?(T=Lr(j.props.children,F.mode,Q,j.key),T.return=F,F=T):(Q=ha(j.type,j.key,j.props,null,F.mode,Q),Q.ref=So(F,T,j),Q.return=F,F=Q)}return g(F);case $:e:{for(de=j.key;T!==null;){if(T.key===de)if(T.tag===4&&T.stateNode.containerInfo===j.containerInfo&&T.stateNode.implementation===j.implementation){i(F,T.sibling),T=c(T,j.children||[]),T.return=F,F=T;break e}else{i(F,T);break}else r(F,T);T=T.sibling}T=Du(j,F.mode,Q),T.return=F,F=T}return g(F);case Ee:return de=j._init,Qe(F,T,de(j._payload),Q)}if(Dn(j))return ne(F,T,j,Q);if(ae(j))return oe(F,T,j,Q);Hi(F,j)}return typeof j=="string"&&j!==""||typeof j=="number"?(j=""+j,T!==null&&T.tag===6?(i(F,T.sibling),T=c(T,j),T.return=F,F=T):(i(F,T),T=ju(j,F.mode,Q),T.return=F,F=T),g(F)):i(F,T)}return Qe}var ws=Wf(!0),qf=Wf(!1),Vi=qn(null),Wi=null,xs=null,ql=null;function Ql(){ql=xs=Wi=null}function Kl(e){var r=Vi.current;ze(Vi),e._currentValue=r}function Gl(e,r,i){for(;e!==null;){var l=e.alternate;if((e.childLanes&r)!==r?(e.childLanes|=r,l!==null&&(l.childLanes|=r)):l!==null&&(l.childLanes&r)!==r&&(l.childLanes|=r),e===i)break;e=e.return}}function Ss(e,r){Wi=e,ql=xs=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&r)!==0&&(kt=!0),e.firstContext=null)}function $t(e){var r=e._currentValue;if(ql!==e)if(e={context:e,memoizedValue:r,next:null},xs===null){if(Wi===null)throw Error(s(308));xs=e,Wi.dependencies={lanes:0,firstContext:e}}else xs=xs.next=e;return r}var Cr=null;function Xl(e){Cr===null?Cr=[e]:Cr.push(e)}function Qf(e,r,i,l){var c=r.interleaved;return c===null?(i.next=i,Xl(r)):(i.next=c.next,c.next=i),r.interleaved=i,Tn(e,l)}function Tn(e,r){e.lanes|=r;var i=e.alternate;for(i!==null&&(i.lanes|=r),i=e,e=e.return;e!==null;)e.childLanes|=r,i=e.alternate,i!==null&&(i.childLanes|=r),i=e,e=e.return;return i.tag===3?i.stateNode:null}var Gn=!1;function Yl(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Kf(e,r){e=e.updateQueue,r.updateQueue===e&&(r.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function An(e,r){return{eventTime:e,lane:r,tag:0,payload:null,callback:null,next:null}}function Xn(e,r,i){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Oe&2)!==0){var c=l.pending;return c===null?r.next=r:(r.next=c.next,c.next=r),l.pending=r,Tn(e,i)}return c=l.interleaved,c===null?(r.next=r,Xl(l)):(r.next=c.next,c.next=r),l.interleaved=r,Tn(e,i)}function qi(e,r,i){if(r=r.updateQueue,r!==null&&(r=r.shared,(i&4194240)!==0)){var l=r.lanes;l&=e.pendingLanes,i|=l,r.lanes=i,dl(e,i)}}function Gf(e,r){var i=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,i===l)){var c=null,f=null;if(i=i.firstBaseUpdate,i!==null){do{var g={eventTime:i.eventTime,lane:i.lane,tag:i.tag,payload:i.payload,callback:i.callback,next:null};f===null?c=f=g:f=f.next=g,i=i.next}while(i!==null);f===null?c=f=r:f=f.next=r}else c=f=r;i={baseState:l.baseState,firstBaseUpdate:c,lastBaseUpdate:f,shared:l.shared,effects:l.effects},e.updateQueue=i;return}e=i.lastBaseUpdate,e===null?i.firstBaseUpdate=r:e.next=r,i.lastBaseUpdate=r}function Qi(e,r,i,l){var c=e.updateQueue;Gn=!1;var f=c.firstBaseUpdate,g=c.lastBaseUpdate,S=c.shared.pending;if(S!==null){c.shared.pending=null;var C=S,D=C.next;C.next=null,g===null?f=D:g.next=D,g=C;var W=e.alternate;W!==null&&(W=W.updateQueue,S=W.lastBaseUpdate,S!==g&&(S===null?W.firstBaseUpdate=D:S.next=D,W.lastBaseUpdate=C))}if(f!==null){var q=c.baseState;g=0,W=D=C=null,S=f;do{var V=S.lane,Z=S.eventTime;if((l&V)===V){W!==null&&(W=W.next={eventTime:Z,lane:0,tag:S.tag,payload:S.payload,callback:S.callback,next:null});e:{var ne=e,oe=S;switch(V=r,Z=i,oe.tag){case 1:if(ne=oe.payload,typeof ne=="function"){q=ne.call(Z,q,V);break e}q=ne;break e;case 3:ne.flags=ne.flags&-65537|128;case 0:if(ne=oe.payload,V=typeof ne=="function"?ne.call(Z,q,V):ne,V==null)break e;q=U({},q,V);break e;case 2:Gn=!0}}S.callback!==null&&S.lane!==0&&(e.flags|=64,V=c.effects,V===null?c.effects=[S]:V.push(S))}else Z={eventTime:Z,lane:V,tag:S.tag,payload:S.payload,callback:S.callback,next:null},W===null?(D=W=Z,C=q):W=W.next=Z,g|=V;if(S=S.next,S===null){if(S=c.shared.pending,S===null)break;V=S,S=V.next,V.next=null,c.lastBaseUpdate=V,c.shared.pending=null}}while(!0);if(W===null&&(C=q),c.baseState=C,c.firstBaseUpdate=D,c.lastBaseUpdate=W,r=c.shared.interleaved,r!==null){c=r;do g|=c.lane,c=c.next;while(c!==r)}else f===null&&(c.shared.lanes=0);Ar|=g,e.lanes=g,e.memoizedState=q}}function Xf(e,r,i){if(e=r.effects,r.effects=null,e!==null)for(r=0;ri?i:4,e(!0);var l=nu.transition;nu.transition={};try{e(!1),r()}finally{je=i,nu.transition=l}}function mh(){return Ht().memoizedState}function Pw(e,r,i){var l=er(e);if(i={lane:l,action:i,hasEagerState:!1,eagerState:null,next:null},gh(e))yh(r,i);else if(i=Qf(e,r,i,l),i!==null){var c=St();sn(i,e,l,c),vh(i,r,l)}}function Nw(e,r,i){var l=er(e),c={lane:l,action:i,hasEagerState:!1,eagerState:null,next:null};if(gh(e))yh(r,c);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=r.lastRenderedReducer,f!==null))try{var g=r.lastRenderedState,S=f(g,i);if(c.hasEagerState=!0,c.eagerState=S,Zt(S,g)){var C=r.interleaved;C===null?(c.next=c,Xl(r)):(c.next=C.next,C.next=c),r.interleaved=c;return}}catch{}finally{}i=Qf(e,r,c,l),i!==null&&(c=St(),sn(i,e,l,c),vh(i,r,l))}}function gh(e){var r=e.alternate;return e===He||r!==null&&r===He}function yh(e,r){ko=Xi=!0;var i=e.pending;i===null?r.next=r:(r.next=i.next,i.next=r),e.pending=r}function vh(e,r,i){if((i&4194240)!==0){var l=r.lanes;l&=e.pendingLanes,i|=l,r.lanes=i,dl(e,i)}}var Zi={readContext:$t,useCallback:pt,useContext:pt,useEffect:pt,useImperativeHandle:pt,useInsertionEffect:pt,useLayoutEffect:pt,useMemo:pt,useReducer:pt,useRef:pt,useState:pt,useDebugValue:pt,useDeferredValue:pt,useTransition:pt,useMutableSource:pt,useSyncExternalStore:pt,useId:pt,unstable_isNewReconciler:!1},Ow={readContext:$t,useCallback:function(e,r){return pn().memoizedState=[e,r===void 0?null:r],e},useContext:$t,useEffect:ah,useImperativeHandle:function(e,r,i){return i=i!=null?i.concat([e]):null,Yi(4194308,4,ch.bind(null,r,e),i)},useLayoutEffect:function(e,r){return Yi(4194308,4,e,r)},useInsertionEffect:function(e,r){return Yi(4,2,e,r)},useMemo:function(e,r){var i=pn();return r=r===void 0?null:r,e=e(),i.memoizedState=[e,r],e},useReducer:function(e,r,i){var l=pn();return r=i!==void 0?i(r):r,l.memoizedState=l.baseState=r,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:r},l.queue=e,e=e.dispatch=Pw.bind(null,He,e),[l.memoizedState,e]},useRef:function(e){var r=pn();return e={current:e},r.memoizedState=e},useState:oh,useDebugValue:uu,useDeferredValue:function(e){return pn().memoizedState=e},useTransition:function(){var e=oh(!1),r=e[0];return e=Aw.bind(null,e[1]),pn().memoizedState=e,[r,e]},useMutableSource:function(){},useSyncExternalStore:function(e,r,i){var l=He,c=pn();if(Be){if(i===void 0)throw Error(s(407));i=i()}else{if(i=r(),rt===null)throw Error(s(349));(Tr&30)!==0||eh(l,r,i)}c.memoizedState=i;var f={value:i,getSnapshot:r};return c.queue=f,ah(nh.bind(null,l,f,e),[e]),l.flags|=2048,To(9,th.bind(null,l,f,i,r),void 0,null),i},useId:function(){var e=pn(),r=rt.identifierPrefix;if(Be){var i=Rn,l=Cn;i=(l&~(1<<32-Jt(l)-1)).toString(32)+i,r=":"+r+"R"+i,i=Co++,0<\/script>",e=e.removeChild(e.firstChild)):typeof l.is=="string"?e=g.createElement(i,{is:l.is}):(e=g.createElement(i),i==="select"&&(g=e,l.multiple?g.multiple=!0:l.size&&(g.size=l.size))):e=g.createElementNS(e,i),e[fn]=r,e[wo]=l,Mh(e,r,!1,!1),r.stateNode=e;e:{switch(g=tl(i,l),i){case"dialog":Ue("cancel",e),Ue("close",e),c=l;break;case"iframe":case"object":case"embed":Ue("load",e),c=l;break;case"video":case"audio":for(c=0;cCs&&(r.flags|=128,l=!0,Ao(f,!1),r.lanes=4194304)}else{if(!l)if(e=Ki(g),e!==null){if(r.flags|=128,l=!0,i=e.updateQueue,i!==null&&(r.updateQueue=i,r.flags|=4),Ao(f,!0),f.tail===null&&f.tailMode==="hidden"&&!g.alternate&&!Be)return mt(r),null}else 2*qe()-f.renderingStartTime>Cs&&i!==1073741824&&(r.flags|=128,l=!0,Ao(f,!1),r.lanes=4194304);f.isBackwards?(g.sibling=r.child,r.child=g):(i=f.last,i!==null?i.sibling=g:r.child=g,f.last=g)}return f.tail!==null?(r=f.tail,f.rendering=r,f.tail=r.sibling,f.renderingStartTime=qe(),r.sibling=null,i=$e.current,Me($e,l?i&1|2:i&1),r):(mt(r),null);case 22:case 23:return Lu(),l=r.memoizedState!==null,e!==null&&e.memoizedState!==null!==l&&(r.flags|=8192),l&&(r.mode&1)!==0?(Ft&1073741824)!==0&&(mt(r),r.subtreeFlags&6&&(r.flags|=8192)):mt(r),null;case 24:return null;case 25:return null}throw Error(s(156,r.tag))}function zw(e,r){switch($l(r),r.tag){case 1:return _t(r.type)&&Di(),e=r.flags,e&65536?(r.flags=e&-65537|128,r):null;case 3:return Es(),ze(bt),ze(ht),tu(),e=r.flags,(e&65536)!==0&&(e&128)===0?(r.flags=e&-65537|128,r):null;case 5:return Zl(r),null;case 13:if(ze($e),e=r.memoizedState,e!==null&&e.dehydrated!==null){if(r.alternate===null)throw Error(s(340));vs()}return e=r.flags,e&65536?(r.flags=e&-65537|128,r):null;case 19:return ze($e),null;case 4:return Es(),null;case 10:return Kl(r.type._context),null;case 22:case 23:return Lu(),null;case 24:return null;default:return null}}var ra=!1,gt=!1,Bw=typeof WeakSet=="function"?WeakSet:Set,te=null;function _s(e,r){var i=e.ref;if(i!==null)if(typeof i=="function")try{i(null)}catch(l){Ve(e,r,l)}else i.current=null}function Su(e,r,i){try{i()}catch(l){Ve(e,r,l)}}var Bh=!1;function $w(e,r){if(Ll=bi,e=wf(),kl(e)){if("selectionStart"in e)var i={start:e.selectionStart,end:e.selectionEnd};else e:{i=(i=e.ownerDocument)&&i.defaultView||window;var l=i.getSelection&&i.getSelection();if(l&&l.rangeCount!==0){i=l.anchorNode;var c=l.anchorOffset,f=l.focusNode;l=l.focusOffset;try{i.nodeType,f.nodeType}catch{i=null;break e}var g=0,S=-1,C=-1,D=0,W=0,q=e,V=null;t:for(;;){for(var Z;q!==i||c!==0&&q.nodeType!==3||(S=g+c),q!==f||l!==0&&q.nodeType!==3||(C=g+l),q.nodeType===3&&(g+=q.nodeValue.length),(Z=q.firstChild)!==null;)V=q,q=Z;for(;;){if(q===e)break t;if(V===i&&++D===c&&(S=g),V===f&&++W===l&&(C=g),(Z=q.nextSibling)!==null)break;q=V,V=q.parentNode}q=Z}i=S===-1||C===-1?null:{start:S,end:C}}else i=null}i=i||{start:0,end:0}}else i=null;for(Il={focusedElem:e,selectionRange:i},bi=!1,te=r;te!==null;)if(r=te,e=r.child,(r.subtreeFlags&1028)!==0&&e!==null)e.return=r,te=e;else for(;te!==null;){r=te;try{var ne=r.alternate;if((r.flags&1024)!==0)switch(r.tag){case 0:case 11:case 15:break;case 1:if(ne!==null){var oe=ne.memoizedProps,Qe=ne.memoizedState,F=r.stateNode,T=F.getSnapshotBeforeUpdate(r.elementType===r.type?oe:tn(r.type,oe),Qe);F.__reactInternalSnapshotBeforeUpdate=T}break;case 3:var j=r.stateNode.containerInfo;j.nodeType===1?j.textContent="":j.nodeType===9&&j.documentElement&&j.removeChild(j.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(s(163))}}catch(Q){Ve(r,r.return,Q)}if(e=r.sibling,e!==null){e.return=r.return,te=e;break}te=r.return}return ne=Bh,Bh=!1,ne}function Po(e,r,i){var l=r.updateQueue;if(l=l!==null?l.lastEffect:null,l!==null){var c=l=l.next;do{if((c.tag&e)===e){var f=c.destroy;c.destroy=void 0,f!==void 0&&Su(r,i,f)}c=c.next}while(c!==l)}}function sa(e,r){if(r=r.updateQueue,r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var l=i.create;i.destroy=l()}i=i.next}while(i!==r)}}function Eu(e){var r=e.ref;if(r!==null){var i=e.stateNode;switch(e.tag){case 5:e=i;break;default:e=i}typeof r=="function"?r(e):r.current=e}}function $h(e){var r=e.alternate;r!==null&&(e.alternate=null,$h(r)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(r=e.stateNode,r!==null&&(delete r[fn],delete r[wo],delete r[Ml],delete r[_w],delete r[kw])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Hh(e){return e.tag===5||e.tag===3||e.tag===4}function Vh(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Hh(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function bu(e,r,i){var l=e.tag;if(l===5||l===6)e=e.stateNode,r?i.nodeType===8?i.parentNode.insertBefore(e,r):i.insertBefore(e,r):(i.nodeType===8?(r=i.parentNode,r.insertBefore(e,i)):(r=i,r.appendChild(e)),i=i._reactRootContainer,i!=null||r.onclick!==null||(r.onclick=Fi));else if(l!==4&&(e=e.child,e!==null))for(bu(e,r,i),e=e.sibling;e!==null;)bu(e,r,i),e=e.sibling}function _u(e,r,i){var l=e.tag;if(l===5||l===6)e=e.stateNode,r?i.insertBefore(e,r):i.appendChild(e);else if(l!==4&&(e=e.child,e!==null))for(_u(e,r,i),e=e.sibling;e!==null;)_u(e,r,i),e=e.sibling}var lt=null,nn=!1;function Yn(e,r,i){for(i=i.child;i!==null;)Wh(e,r,i),i=i.sibling}function Wh(e,r,i){if(dn&&typeof dn.onCommitFiberUnmount=="function")try{dn.onCommitFiberUnmount(yi,i)}catch{}switch(i.tag){case 5:gt||_s(i,r);case 6:var l=lt,c=nn;lt=null,Yn(e,r,i),lt=l,nn=c,lt!==null&&(nn?(e=lt,i=i.stateNode,e.nodeType===8?e.parentNode.removeChild(i):e.removeChild(i)):lt.removeChild(i.stateNode));break;case 18:lt!==null&&(nn?(e=lt,i=i.stateNode,e.nodeType===8?Dl(e.parentNode,i):e.nodeType===1&&Dl(e,i),ao(e)):Dl(lt,i.stateNode));break;case 4:l=lt,c=nn,lt=i.stateNode.containerInfo,nn=!0,Yn(e,r,i),lt=l,nn=c;break;case 0:case 11:case 14:case 15:if(!gt&&(l=i.updateQueue,l!==null&&(l=l.lastEffect,l!==null))){c=l=l.next;do{var f=c,g=f.destroy;f=f.tag,g!==void 0&&((f&2)!==0||(f&4)!==0)&&Su(i,r,g),c=c.next}while(c!==l)}Yn(e,r,i);break;case 1:if(!gt&&(_s(i,r),l=i.stateNode,typeof l.componentWillUnmount=="function"))try{l.props=i.memoizedProps,l.state=i.memoizedState,l.componentWillUnmount()}catch(S){Ve(i,r,S)}Yn(e,r,i);break;case 21:Yn(e,r,i);break;case 22:i.mode&1?(gt=(l=gt)||i.memoizedState!==null,Yn(e,r,i),gt=l):Yn(e,r,i);break;default:Yn(e,r,i)}}function qh(e){var r=e.updateQueue;if(r!==null){e.updateQueue=null;var i=e.stateNode;i===null&&(i=e.stateNode=new Bw),r.forEach(function(l){var c=Yw.bind(null,e,l);i.has(l)||(i.add(l),l.then(c,c))})}}function rn(e,r){var i=r.deletions;if(i!==null)for(var l=0;lc&&(c=g),l&=~f}if(l=c,l=qe()-l,l=(120>l?120:480>l?480:1080>l?1080:1920>l?1920:3e3>l?3e3:4320>l?4320:1960*Vw(l/1960))-l,10e?16:e,Zn===null)var l=!1;else{if(e=Zn,Zn=null,ua=0,(Oe&6)!==0)throw Error(s(331));var c=Oe;for(Oe|=4,te=e.current;te!==null;){var f=te,g=f.child;if((te.flags&16)!==0){var S=f.deletions;if(S!==null){for(var C=0;Cqe()-Ru?Nr(e,0):Cu|=i),Rt(e,r)}function op(e,r){r===0&&((e.mode&1)===0?r=1:(r=wi,wi<<=1,(wi&130023424)===0&&(wi=4194304)));var i=St();e=Tn(e,r),e!==null&&(no(e,r,i),Rt(e,i))}function Xw(e){var r=e.memoizedState,i=0;r!==null&&(i=r.retryLane),op(e,i)}function Yw(e,r){var i=0;switch(e.tag){case 13:var l=e.stateNode,c=e.memoizedState;c!==null&&(i=c.retryLane);break;case 19:l=e.stateNode;break;default:throw Error(s(314))}l!==null&&l.delete(r),op(e,i)}var ip;ip=function(e,r,i){if(e!==null)if(e.memoizedProps!==r.pendingProps||bt.current)kt=!0;else{if((e.lanes&i)===0&&(r.flags&128)===0)return kt=!1,Mw(e,r,i);kt=(e.flags&131072)!==0}else kt=!1,Be&&(r.flags&1048576)!==0&&Uf(r,Bi,r.index);switch(r.lanes=0,r.tag){case 2:var l=r.type;na(e,r),e=r.pendingProps;var c=ms(r,ht.current);Ss(r,i),c=su(null,r,l,e,c,i);var f=ou();return r.flags|=1,typeof c=="object"&&c!==null&&typeof c.render=="function"&&c.$$typeof===void 0?(r.tag=1,r.memoizedState=null,r.updateQueue=null,_t(l)?(f=!0,Mi(r)):f=!1,r.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,Yl(r),c.updater=ea,r.stateNode=c,c._reactInternals=r,du(r,l,e,i),r=mu(null,r,l,!0,f,i)):(r.tag=0,Be&&f&&Bl(r),xt(null,r,c,i),r=r.child),r;case 16:l=r.elementType;e:{switch(na(e,r),e=r.pendingProps,c=l._init,l=c(l._payload),r.type=l,c=r.tag=Zw(l),e=tn(l,e),c){case 0:r=pu(null,r,l,e,i);break e;case 1:r=Oh(null,r,l,e,i);break e;case 11:r=Rh(null,r,l,e,i);break e;case 14:r=Th(null,r,l,tn(l.type,e),i);break e}throw Error(s(306,l,""))}return r;case 0:return l=r.type,c=r.pendingProps,c=r.elementType===l?c:tn(l,c),pu(e,r,l,c,i);case 1:return l=r.type,c=r.pendingProps,c=r.elementType===l?c:tn(l,c),Oh(e,r,l,c,i);case 3:e:{if(Lh(r),e===null)throw Error(s(387));l=r.pendingProps,f=r.memoizedState,c=f.element,Kf(e,r),Qi(r,l,null,i);var g=r.memoizedState;if(l=g.element,f.isDehydrated)if(f={element:l,isDehydrated:!1,cache:g.cache,pendingSuspenseBoundaries:g.pendingSuspenseBoundaries,transitions:g.transitions},r.updateQueue.baseState=f,r.memoizedState=f,r.flags&256){c=bs(Error(s(423)),r),r=Ih(e,r,l,i,c);break e}else if(l!==c){c=bs(Error(s(424)),r),r=Ih(e,r,l,i,c);break e}else for(It=Wn(r.stateNode.containerInfo.firstChild),Lt=r,Be=!0,en=null,i=qf(r,null,l,i),r.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling;else{if(vs(),l===c){r=Pn(e,r,i);break e}xt(e,r,l,i)}r=r.child}return r;case 5:return Yf(r),e===null&&Vl(r),l=r.type,c=r.pendingProps,f=e!==null?e.memoizedProps:null,g=c.children,Fl(l,c)?g=null:f!==null&&Fl(l,f)&&(r.flags|=32),Nh(e,r),xt(e,r,g,i),r.child;case 6:return e===null&&Vl(r),null;case 13:return Fh(e,r,i);case 4:return Jl(r,r.stateNode.containerInfo),l=r.pendingProps,e===null?r.child=ws(r,null,l,i):xt(e,r,l,i),r.child;case 11:return l=r.type,c=r.pendingProps,c=r.elementType===l?c:tn(l,c),Rh(e,r,l,c,i);case 7:return xt(e,r,r.pendingProps,i),r.child;case 8:return xt(e,r,r.pendingProps.children,i),r.child;case 12:return xt(e,r,r.pendingProps.children,i),r.child;case 10:e:{if(l=r.type._context,c=r.pendingProps,f=r.memoizedProps,g=c.value,Me(Vi,l._currentValue),l._currentValue=g,f!==null)if(Zt(f.value,g)){if(f.children===c.children&&!bt.current){r=Pn(e,r,i);break e}}else for(f=r.child,f!==null&&(f.return=r);f!==null;){var S=f.dependencies;if(S!==null){g=f.child;for(var C=S.firstContext;C!==null;){if(C.context===l){if(f.tag===1){C=An(-1,i&-i),C.tag=2;var D=f.updateQueue;if(D!==null){D=D.shared;var W=D.pending;W===null?C.next=C:(C.next=W.next,W.next=C),D.pending=C}}f.lanes|=i,C=f.alternate,C!==null&&(C.lanes|=i),Gl(f.return,i,r),S.lanes|=i;break}C=C.next}}else if(f.tag===10)g=f.type===r.type?null:f.child;else if(f.tag===18){if(g=f.return,g===null)throw Error(s(341));g.lanes|=i,S=g.alternate,S!==null&&(S.lanes|=i),Gl(g,i,r),g=f.sibling}else g=f.child;if(g!==null)g.return=f;else for(g=f;g!==null;){if(g===r){g=null;break}if(f=g.sibling,f!==null){f.return=g.return,g=f;break}g=g.return}f=g}xt(e,r,c.children,i),r=r.child}return r;case 9:return c=r.type,l=r.pendingProps.children,Ss(r,i),c=$t(c),l=l(c),r.flags|=1,xt(e,r,l,i),r.child;case 14:return l=r.type,c=tn(l,r.pendingProps),c=tn(l.type,c),Th(e,r,l,c,i);case 15:return Ah(e,r,r.type,r.pendingProps,i);case 17:return l=r.type,c=r.pendingProps,c=r.elementType===l?c:tn(l,c),na(e,r),r.tag=1,_t(l)?(e=!0,Mi(r)):e=!1,Ss(r,i),xh(r,l,c),du(r,l,c,i),mu(null,r,l,!0,e,i);case 19:return Dh(e,r,i);case 22:return Ph(e,r,i)}throw Error(s(156,r.tag))};function ap(e,r){return Ud(e,r)}function Jw(e,r,i,l){this.tag=e,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Wt(e,r,i,l){return new Jw(e,r,i,l)}function Fu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Zw(e){if(typeof e=="function")return Fu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Te)return 11;if(e===be)return 14}return 2}function nr(e,r){var i=e.alternate;return i===null?(i=Wt(e.tag,r,e.key,e.mode),i.elementType=e.elementType,i.type=e.type,i.stateNode=e.stateNode,i.alternate=e,e.alternate=i):(i.pendingProps=r,i.type=e.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=e.flags&14680064,i.childLanes=e.childLanes,i.lanes=e.lanes,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,r=e.dependencies,i.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},i.sibling=e.sibling,i.index=e.index,i.ref=e.ref,i}function ha(e,r,i,l,c,f){var g=2;if(l=e,typeof e=="function")Fu(e)&&(g=1);else if(typeof e=="string")g=5;else e:switch(e){case G:return Lr(i.children,c,f,r);case B:g=8,c|=8;break;case ie:return e=Wt(12,i,r,c|2),e.elementType=ie,e.lanes=f,e;case xe:return e=Wt(13,i,r,c),e.elementType=xe,e.lanes=f,e;case J:return e=Wt(19,i,r,c),e.elementType=J,e.lanes=f,e;case _e:return pa(i,c,f,r);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ue:g=10;break e;case Se:g=9;break e;case Te:g=11;break e;case be:g=14;break e;case Ee:g=16,l=null;break e}throw Error(s(130,e==null?e:typeof e,""))}return r=Wt(g,i,r,c),r.elementType=e,r.type=l,r.lanes=f,r}function Lr(e,r,i,l){return e=Wt(7,e,l,r),e.lanes=i,e}function pa(e,r,i,l){return e=Wt(22,e,l,r),e.elementType=_e,e.lanes=i,e.stateNode={isHidden:!1},e}function ju(e,r,i){return e=Wt(6,e,null,r),e.lanes=i,e}function Du(e,r,i){return r=Wt(4,e.children!==null?e.children:[],e.key,r),r.lanes=i,r.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},r}function e0(e,r,i,l,c){this.tag=r,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=cl(0),this.expirationTimes=cl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=cl(0),this.identifierPrefix=l,this.onRecoverableError=c,this.mutableSourceEagerHydrationData=null}function Mu(e,r,i,l,c,f,g,S,C){return e=new e0(e,r,i,S,C),r===1?(r=1,f===!0&&(r|=8)):r=0,f=Wt(3,null,null,r),e.current=f,f.stateNode=e,f.memoizedState={element:l,isDehydrated:i,cache:null,transitions:null,pendingSuspenseBoundaries:null},Yl(f),e}function t0(e,r,i){var l=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(t){console.error(t)}}return n(),Wu.exports=m0(),Wu.exports}var Ep;function g0(){if(Ep)return Ea;Ep=1;var n=tg();return Ea.createRoot=n.createRoot,Ea.hydrateRoot=n.hydrateRoot,Ea}var y0=g0();const v0=Wc(y0),w0=20,x0=1e6,jn={ADD_TOAST:"ADD_TOAST",UPDATE_TOAST:"UPDATE_TOAST",DISMISS_TOAST:"DISMISS_TOAST",REMOVE_TOAST:"REMOVE_TOAST"};let Ku=0;function S0(){return Ku=(Ku+1)%Number.MAX_VALUE,Ku.toString()}const Gu=new Map,bp=n=>{if(Gu.has(n))return;const t=setTimeout(()=>{Gu.delete(n),qo({type:jn.REMOVE_TOAST,toastId:n})},x0);Gu.set(n,t)},E0=(n,t)=>{switch(t.type){case jn.ADD_TOAST:return{...n,toasts:[t.toast,...n.toasts].slice(0,w0)};case jn.UPDATE_TOAST:return{...n,toasts:n.toasts.map(s=>s.id===t.toast.id?{...s,...t.toast}:s)};case jn.DISMISS_TOAST:{const{toastId:s}=t;return s?bp(s):n.toasts.forEach(o=>{bp(o.id)}),{...n,toasts:n.toasts.map(o=>o.id===s||s===void 0?{...o,open:!1}:o)}}case jn.REMOVE_TOAST:return t.toastId===void 0?{...n,toasts:[]}:{...n,toasts:n.toasts.filter(s=>s.id!==t.toastId)}}},Oa=[];let La={toasts:[]};function qo(n){La=E0(La,n),Oa.forEach(t=>{t(La)})}function b0({...n}){const t=S0(),s=a=>qo({type:jn.UPDATE_TOAST,toast:{...a,id:t}}),o=()=>qo({type:jn.DISMISS_TOAST,toastId:t});return qo({type:jn.ADD_TOAST,toast:{...n,id:t,open:!0,onOpenChange:a=>{a||o()}}}),{id:t,dismiss:o,update:s}}function _0(){const[n,t]=b.useState(La);return b.useEffect(()=>(Oa.push(t),()=>{const s=Oa.indexOf(t);s>-1&&Oa.splice(s,1)}),[n]),{...n,toast:b0,dismiss:s=>qo({type:jn.DISMISS_TOAST,toastId:s})}}var Qc=tg();const k0=Wc(Qc);function jt(n,t,{checkForDefaultPrevented:s=!0}={}){return function(a){if(n==null||n(a),s===!1||!a.defaultPrevented)return t==null?void 0:t(a)}}function _p(n,t){if(typeof n=="function")return n(t);n!=null&&(n.current=t)}function Kc(...n){return t=>{let s=!1;const o=n.map(a=>{const u=_p(a,t);return!s&&typeof u=="function"&&(s=!0),u});if(s)return()=>{for(let a=0;a{var E;const{scope:k,children:L,...M}=v,_=((E=k==null?void 0:k[n])==null?void 0:E[p])||h,x=b.useMemo(()=>M,Object.values(M));return w.jsx(_.Provider,{value:x,children:L})};m.displayName=u+"Provider";function y(v,k){var _;const L=((_=k==null?void 0:k[n])==null?void 0:_[p])||h,M=b.useContext(L);if(M)return M;if(d!==void 0)return d;throw new Error(`\`${v}\` must be used within \`${u}\``)}return[m,y]}const a=()=>{const u=s.map(d=>b.createContext(d));return function(h){const p=(h==null?void 0:h[n])||u;return b.useMemo(()=>({[`__scope${n}`]:{...h,[n]:p}}),[h,p])}};return a.scopeName=n,[o,C0(a,...t)]}function C0(...n){const t=n[0];if(n.length===1)return t;const s=()=>{const o=n.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(u){const d=o.reduce((h,{useScope:p,scopeName:m})=>{const v=p(u)[`__scope${m}`];return{...h,...v}},{});return b.useMemo(()=>({[`__scope${t.scopeName}`]:d}),[d])}};return s.scopeName=t.scopeName,s}function kp(n){const t=R0(n),s=b.forwardRef((o,a)=>{const{children:u,...d}=o,h=b.Children.toArray(u),p=h.find(A0);if(p){const m=p.props.children,y=h.map(v=>v===p?b.Children.count(m)>1?b.Children.only(null):b.isValidElement(m)?m.props.children:null:v);return w.jsx(t,{...d,ref:a,children:b.isValidElement(m)?b.cloneElement(m,void 0,y):null})}return w.jsx(t,{...d,ref:a,children:u})});return s.displayName=`${n}.Slot`,s}function R0(n){const t=b.forwardRef((s,o)=>{const{children:a,...u}=s;if(b.isValidElement(a)){const d=N0(a),h=P0(u,a.props);return a.type!==b.Fragment&&(h.ref=o?Kc(o,d):d),b.cloneElement(a,h)}return b.Children.count(a)>1?b.Children.only(null):null});return t.displayName=`${n}.SlotClone`,t}var T0=Symbol("radix.slottable");function A0(n){return b.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===T0}function P0(n,t){const s={...t};for(const o in t){const a=n[o],u=t[o];/^on[A-Z]/.test(o)?a&&u?s[o]=(...h)=>{const p=u(...h);return a(...h),p}:a&&(s[o]=a):o==="style"?s[o]={...a,...u}:o==="className"&&(s[o]=[a,u].filter(Boolean).join(" "))}return{...n,...s}}function N0(n){var o,a;let t=(o=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:o.get,s=t&&"isReactWarning"in t&&t.isReactWarning;return s?n.ref:(t=(a=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:a.get,s=t&&"isReactWarning"in t&&t.isReactWarning,s?n.props.ref:n.props.ref||n.ref)}function O0(n){const t=n+"CollectionProvider",[s,o]=ng(t),[a,u]=s(t,{collectionRef:{current:null},itemMap:new Map}),d=_=>{const{scope:x,children:E}=_,I=ir.useRef(null),A=ir.useRef(new Map).current;return w.jsx(a,{scope:x,itemMap:A,collectionRef:I,children:E})};d.displayName=t;const h=n+"CollectionSlot",p=kp(h),m=ir.forwardRef((_,x)=>{const{scope:E,children:I}=_,A=u(h,E),O=Xr(x,A.collectionRef);return w.jsx(p,{ref:O,children:I})});m.displayName=h;const y=n+"CollectionItemSlot",v="data-radix-collection-item",k=kp(y),L=ir.forwardRef((_,x)=>{const{scope:E,children:I,...A}=_,O=ir.useRef(null),H=Xr(x,O),$=u(y,E);return ir.useEffect(()=>($.itemMap.set(O,{ref:O,...A}),()=>void $.itemMap.delete(O))),w.jsx(k,{[v]:"",ref:H,children:I})});L.displayName=y;function M(_){const x=u(n+"CollectionConsumer",_);return ir.useCallback(()=>{const I=x.collectionRef.current;if(!I)return[];const A=Array.from(I.querySelectorAll(`[${v}]`));return Array.from(x.itemMap.values()).sort(($,G)=>A.indexOf($.ref.current)-A.indexOf(G.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:d,Slot:m,ItemSlot:L},M,o]}function L0(n){const t=I0(n),s=b.forwardRef((o,a)=>{const{children:u,...d}=o,h=b.Children.toArray(u),p=h.find(j0);if(p){const m=p.props.children,y=h.map(v=>v===p?b.Children.count(m)>1?b.Children.only(null):b.isValidElement(m)?m.props.children:null:v);return w.jsx(t,{...d,ref:a,children:b.isValidElement(m)?b.cloneElement(m,void 0,y):null})}return w.jsx(t,{...d,ref:a,children:u})});return s.displayName=`${n}.Slot`,s}function I0(n){const t=b.forwardRef((s,o)=>{const{children:a,...u}=s;if(b.isValidElement(a)){const d=M0(a),h=D0(u,a.props);return a.type!==b.Fragment&&(h.ref=o?Kc(o,d):d),b.cloneElement(a,h)}return b.Children.count(a)>1?b.Children.only(null):null});return t.displayName=`${n}.SlotClone`,t}var F0=Symbol("radix.slottable");function j0(n){return b.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===F0}function D0(n,t){const s={...t};for(const o in t){const a=n[o],u=t[o];/^on[A-Z]/.test(o)?a&&u?s[o]=(...h)=>{const p=u(...h);return a(...h),p}:a&&(s[o]=a):o==="style"?s[o]={...a,...u}:o==="className"&&(s[o]=[a,u].filter(Boolean).join(" "))}return{...n,...s}}function M0(n){var o,a;let t=(o=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:o.get,s=t&&"isReactWarning"in t&&t.isReactWarning;return s?n.ref:(t=(a=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:a.get,s=t&&"isReactWarning"in t&&t.isReactWarning,s?n.props.ref:n.props.ref||n.ref)}var U0=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],En=U0.reduce((n,t)=>{const s=L0(`Primitive.${t}`),o=b.forwardRef((a,u)=>{const{asChild:d,...h}=a,p=d?s:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),w.jsx(p,{...h,ref:u})});return o.displayName=`Primitive.${t}`,{...n,[t]:o}},{});function rg(n,t){n&&Qc.flushSync(()=>n.dispatchEvent(t))}function Yr(n){const t=b.useRef(n);return b.useEffect(()=>{t.current=n}),b.useMemo(()=>(...s)=>{var o;return(o=t.current)==null?void 0:o.call(t,...s)},[])}function z0(n,t=globalThis==null?void 0:globalThis.document){const s=Yr(n);b.useEffect(()=>{const o=a=>{a.key==="Escape"&&s(a)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[s,t])}var B0="DismissableLayer",dc="dismissableLayer.update",$0="dismissableLayer.pointerDownOutside",H0="dismissableLayer.focusOutside",Cp,sg=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),og=b.forwardRef((n,t)=>{const{disableOutsidePointerEvents:s=!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:u,onInteractOutside:d,onDismiss:h,...p}=n,m=b.useContext(sg),[y,v]=b.useState(null),k=(y==null?void 0:y.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,L]=b.useState({}),M=Xr(t,G=>v(G)),_=Array.from(m.layers),[x]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),E=_.indexOf(x),I=y?_.indexOf(y):-1,A=m.layersWithOutsidePointerEventsDisabled.size>0,O=I>=E,H=W0(G=>{const B=G.target,ie=[...m.branches].some(ue=>ue.contains(B));!O||ie||(a==null||a(G),d==null||d(G),G.defaultPrevented||h==null||h())},k),$=q0(G=>{const B=G.target;[...m.branches].some(ue=>ue.contains(B))||(u==null||u(G),d==null||d(G),G.defaultPrevented||h==null||h())},k);return z0(G=>{I===m.layers.size-1&&(o==null||o(G),!G.defaultPrevented&&h&&(G.preventDefault(),h()))},k),b.useEffect(()=>{if(y)return s&&(m.layersWithOutsidePointerEventsDisabled.size===0&&(Cp=k.body.style.pointerEvents,k.body.style.pointerEvents="none"),m.layersWithOutsidePointerEventsDisabled.add(y)),m.layers.add(y),Rp(),()=>{s&&m.layersWithOutsidePointerEventsDisabled.size===1&&(k.body.style.pointerEvents=Cp)}},[y,k,s,m]),b.useEffect(()=>()=>{y&&(m.layers.delete(y),m.layersWithOutsidePointerEventsDisabled.delete(y),Rp())},[y,m]),b.useEffect(()=>{const G=()=>L({});return document.addEventListener(dc,G),()=>document.removeEventListener(dc,G)},[]),w.jsx(En.div,{...p,ref:M,style:{pointerEvents:A?O?"auto":"none":void 0,...n.style},onFocusCapture:jt(n.onFocusCapture,$.onFocusCapture),onBlurCapture:jt(n.onBlurCapture,$.onBlurCapture),onPointerDownCapture:jt(n.onPointerDownCapture,H.onPointerDownCapture)})});og.displayName=B0;var V0="DismissableLayerBranch",ig=b.forwardRef((n,t)=>{const s=b.useContext(sg),o=b.useRef(null),a=Xr(t,o);return b.useEffect(()=>{const u=o.current;if(u)return s.branches.add(u),()=>{s.branches.delete(u)}},[s.branches]),w.jsx(En.div,{...n,ref:a})});ig.displayName=V0;function W0(n,t=globalThis==null?void 0:globalThis.document){const s=Yr(n),o=b.useRef(!1),a=b.useRef(()=>{});return b.useEffect(()=>{const u=h=>{if(h.target&&!o.current){let p=function(){ag($0,s,m,{discrete:!0})};const m={originalEvent:h};h.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=p,t.addEventListener("click",a.current,{once:!0})):p()}else t.removeEventListener("click",a.current);o.current=!1},d=window.setTimeout(()=>{t.addEventListener("pointerdown",u)},0);return()=>{window.clearTimeout(d),t.removeEventListener("pointerdown",u),t.removeEventListener("click",a.current)}},[t,s]),{onPointerDownCapture:()=>o.current=!0}}function q0(n,t=globalThis==null?void 0:globalThis.document){const s=Yr(n),o=b.useRef(!1);return b.useEffect(()=>{const a=u=>{u.target&&!o.current&&ag(H0,s,{originalEvent:u},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,s]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Rp(){const n=new CustomEvent(dc);document.dispatchEvent(n)}function ag(n,t,s,{discrete:o}){const a=s.originalEvent.target,u=new CustomEvent(n,{bubbles:!1,cancelable:!0,detail:s});t&&a.addEventListener(n,t,{once:!0}),o?rg(a,u):a.dispatchEvent(u)}var Q0=og,K0=ig,Ko=globalThis!=null&&globalThis.document?b.useLayoutEffect:()=>{},G0="Portal",lg=b.forwardRef((n,t)=>{var h;const{container:s,...o}=n,[a,u]=b.useState(!1);Ko(()=>u(!0),[]);const d=s||a&&((h=globalThis==null?void 0:globalThis.document)==null?void 0:h.body);return d?k0.createPortal(w.jsx(En.div,{...o,ref:t}),d):null});lg.displayName=G0;function X0(n,t){return b.useReducer((s,o)=>t[s][o]??s,n)}var ug=n=>{const{present:t,children:s}=n,o=Y0(t),a=typeof s=="function"?s({present:o.isPresent}):b.Children.only(s),u=Xr(o.ref,J0(a));return typeof s=="function"||o.isPresent?b.cloneElement(a,{ref:u}):null};ug.displayName="Presence";function Y0(n){const[t,s]=b.useState(),o=b.useRef(null),a=b.useRef(n),u=b.useRef("none"),d=n?"mounted":"unmounted",[h,p]=X0(d,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return b.useEffect(()=>{const m=ba(o.current);u.current=h==="mounted"?m:"none"},[h]),Ko(()=>{const m=o.current,y=a.current;if(y!==n){const k=u.current,L=ba(m);n?p("MOUNT"):L==="none"||(m==null?void 0:m.display)==="none"?p("UNMOUNT"):p(y&&k!==L?"ANIMATION_OUT":"UNMOUNT"),a.current=n}},[n,p]),Ko(()=>{if(t){let m;const y=t.ownerDocument.defaultView??window,v=L=>{const _=ba(o.current).includes(CSS.escape(L.animationName));if(L.target===t&&_&&(p("ANIMATION_END"),!a.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",m=y.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},k=L=>{L.target===t&&(u.current=ba(o.current))};return t.addEventListener("animationstart",k),t.addEventListener("animationcancel",v),t.addEventListener("animationend",v),()=>{y.clearTimeout(m),t.removeEventListener("animationstart",k),t.removeEventListener("animationcancel",v),t.removeEventListener("animationend",v)}}else p("ANIMATION_END")},[t,p]),{isPresent:["mounted","unmountSuspended"].includes(h),ref:b.useCallback(m=>{o.current=m?getComputedStyle(m):null,s(m)},[])}}function ba(n){return(n==null?void 0:n.animationName)||"none"}function J0(n){var o,a;let t=(o=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:o.get,s=t&&"isReactWarning"in t&&t.isReactWarning;return s?n.ref:(t=(a=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:a.get,s=t&&"isReactWarning"in t&&t.isReactWarning,s?n.props.ref:n.props.ref||n.ref)}var Z0=eg[" useInsertionEffect ".trim().toString()]||Ko;function ex({prop:n,defaultProp:t,onChange:s=()=>{},caller:o}){const[a,u,d]=tx({defaultProp:t,onChange:s}),h=n!==void 0,p=h?n:a;{const y=b.useRef(n!==void 0);b.useEffect(()=>{const v=y.current;v!==h&&console.warn(`${o} is changing from ${v?"controlled":"uncontrolled"} to ${h?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),y.current=h},[h,o])}const m=b.useCallback(y=>{var v;if(h){const k=nx(y)?y(n):y;k!==n&&((v=d.current)==null||v.call(d,k))}else u(y)},[h,n,u,d]);return[p,m]}function tx({defaultProp:n,onChange:t}){const[s,o]=b.useState(n),a=b.useRef(s),u=b.useRef(t);return Z0(()=>{u.current=t},[t]),b.useEffect(()=>{var d;a.current!==s&&((d=u.current)==null||d.call(u,s),a.current=s)},[s,a]),[s,o,u]}function nx(n){return typeof n=="function"}var rx=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),sx="VisuallyHidden",Gc=b.forwardRef((n,t)=>w.jsx(En.span,{...n,ref:t,style:{...rx,...n.style}}));Gc.displayName=sx;var Xc="ToastProvider",[Yc,ox,ix]=O0("Toast"),[cg]=ng("Toast",[ix]),[ax,Qa]=cg(Xc),dg=n=>{const{__scopeToast:t,label:s="Notification",duration:o=5e3,swipeDirection:a="right",swipeThreshold:u=50,children:d}=n,[h,p]=b.useState(null),[m,y]=b.useState(0),v=b.useRef(!1),k=b.useRef(!1);return s.trim()||console.error(`Invalid prop \`label\` supplied to \`${Xc}\`. Expected non-empty \`string\`.`),w.jsx(Yc.Provider,{scope:t,children:w.jsx(ax,{scope:t,label:s,duration:o,swipeDirection:a,swipeThreshold:u,toastCount:m,viewport:h,onViewportChange:p,onToastAdd:b.useCallback(()=>y(L=>L+1),[]),onToastRemove:b.useCallback(()=>y(L=>L-1),[]),isFocusedToastEscapeKeyDownRef:v,isClosePausedRef:k,children:d})})};dg.displayName=Xc;var fg="ToastViewport",lx=["F8"],fc="toast.viewportPause",hc="toast.viewportResume",hg=b.forwardRef((n,t)=>{const{__scopeToast:s,hotkey:o=lx,label:a="Notifications ({hotkey})",...u}=n,d=Qa(fg,s),h=ox(s),p=b.useRef(null),m=b.useRef(null),y=b.useRef(null),v=b.useRef(null),k=Xr(t,v,d.onViewportChange),L=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),M=d.toastCount>0;b.useEffect(()=>{const x=E=>{var A;o.length!==0&&o.every(O=>E[O]||E.code===O)&&((A=v.current)==null||A.focus())};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[o]),b.useEffect(()=>{const x=p.current,E=v.current;if(M&&x&&E){const I=()=>{if(!d.isClosePausedRef.current){const $=new CustomEvent(fc);E.dispatchEvent($),d.isClosePausedRef.current=!0}},A=()=>{if(d.isClosePausedRef.current){const $=new CustomEvent(hc);E.dispatchEvent($),d.isClosePausedRef.current=!1}},O=$=>{!x.contains($.relatedTarget)&&A()},H=()=>{x.contains(document.activeElement)||A()};return x.addEventListener("focusin",I),x.addEventListener("focusout",O),x.addEventListener("pointermove",I),x.addEventListener("pointerleave",H),window.addEventListener("blur",I),window.addEventListener("focus",A),()=>{x.removeEventListener("focusin",I),x.removeEventListener("focusout",O),x.removeEventListener("pointermove",I),x.removeEventListener("pointerleave",H),window.removeEventListener("blur",I),window.removeEventListener("focus",A)}}},[M,d.isClosePausedRef]);const _=b.useCallback(({tabbingDirection:x})=>{const I=h().map(A=>{const O=A.ref.current,H=[O,...Sx(O)];return x==="forwards"?H:H.reverse()});return(x==="forwards"?I.reverse():I).flat()},[h]);return b.useEffect(()=>{const x=v.current;if(x){const E=I=>{var H,$,G;const A=I.altKey||I.ctrlKey||I.metaKey;if(I.key==="Tab"&&!A){const B=document.activeElement,ie=I.shiftKey;if(I.target===x&&ie){(H=m.current)==null||H.focus();return}const Te=_({tabbingDirection:ie?"backwards":"forwards"}),xe=Te.findIndex(J=>J===B);Xu(Te.slice(xe+1))?I.preventDefault():ie?($=m.current)==null||$.focus():(G=y.current)==null||G.focus()}};return x.addEventListener("keydown",E),()=>x.removeEventListener("keydown",E)}},[h,_]),w.jsxs(K0,{ref:p,role:"region","aria-label":a.replace("{hotkey}",L),tabIndex:-1,style:{pointerEvents:M?void 0:"none"},children:[M&&w.jsx(pc,{ref:m,onFocusFromOutsideViewport:()=>{const x=_({tabbingDirection:"forwards"});Xu(x)}}),w.jsx(Yc.Slot,{scope:s,children:w.jsx(En.ol,{tabIndex:-1,...u,ref:k})}),M&&w.jsx(pc,{ref:y,onFocusFromOutsideViewport:()=>{const x=_({tabbingDirection:"backwards"});Xu(x)}})]})});hg.displayName=fg;var pg="ToastFocusProxy",pc=b.forwardRef((n,t)=>{const{__scopeToast:s,onFocusFromOutsideViewport:o,...a}=n,u=Qa(pg,s);return w.jsx(Gc,{tabIndex:0,...a,ref:t,style:{position:"fixed"},onFocus:d=>{var m;const h=d.relatedTarget;!((m=u.viewport)!=null&&m.contains(h))&&o()}})});pc.displayName=pg;var oi="Toast",ux="toast.swipeStart",cx="toast.swipeMove",dx="toast.swipeCancel",fx="toast.swipeEnd",mg=b.forwardRef((n,t)=>{const{forceMount:s,open:o,defaultOpen:a,onOpenChange:u,...d}=n,[h,p]=ex({prop:o,defaultProp:a??!0,onChange:u,caller:oi});return w.jsx(ug,{present:s||h,children:w.jsx(mx,{open:h,...d,ref:t,onClose:()=>p(!1),onPause:Yr(n.onPause),onResume:Yr(n.onResume),onSwipeStart:jt(n.onSwipeStart,m=>{m.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:jt(n.onSwipeMove,m=>{const{x:y,y:v}=m.detail.delta;m.currentTarget.setAttribute("data-swipe","move"),m.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${y}px`),m.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${v}px`)}),onSwipeCancel:jt(n.onSwipeCancel,m=>{m.currentTarget.setAttribute("data-swipe","cancel"),m.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),m.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),m.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),m.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:jt(n.onSwipeEnd,m=>{const{x:y,y:v}=m.detail.delta;m.currentTarget.setAttribute("data-swipe","end"),m.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),m.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),m.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${y}px`),m.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${v}px`),p(!1)})})})});mg.displayName=oi;var[hx,px]=cg(oi,{onClose(){}}),mx=b.forwardRef((n,t)=>{const{__scopeToast:s,type:o="foreground",duration:a,open:u,onClose:d,onEscapeKeyDown:h,onPause:p,onResume:m,onSwipeStart:y,onSwipeMove:v,onSwipeCancel:k,onSwipeEnd:L,...M}=n,_=Qa(oi,s),[x,E]=b.useState(null),I=Xr(t,J=>E(J)),A=b.useRef(null),O=b.useRef(null),H=a||_.duration,$=b.useRef(0),G=b.useRef(H),B=b.useRef(0),{onToastAdd:ie,onToastRemove:ue}=_,Se=Yr(()=>{var be;(x==null?void 0:x.contains(document.activeElement))&&((be=_.viewport)==null||be.focus()),d()}),Te=b.useCallback(J=>{!J||J===1/0||(window.clearTimeout(B.current),$.current=new Date().getTime(),B.current=window.setTimeout(Se,J))},[Se]);b.useEffect(()=>{const J=_.viewport;if(J){const be=()=>{Te(G.current),m==null||m()},Ee=()=>{const _e=new Date().getTime()-$.current;G.current=G.current-_e,window.clearTimeout(B.current),p==null||p()};return J.addEventListener(fc,Ee),J.addEventListener(hc,be),()=>{J.removeEventListener(fc,Ee),J.removeEventListener(hc,be)}}},[_.viewport,H,p,m,Te]),b.useEffect(()=>{u&&!_.isClosePausedRef.current&&Te(H)},[u,H,_.isClosePausedRef,Te]),b.useEffect(()=>(ie(),()=>ue()),[ie,ue]);const xe=b.useMemo(()=>x?Eg(x):null,[x]);return _.viewport?w.jsxs(w.Fragment,{children:[xe&&w.jsx(gx,{__scopeToast:s,role:"status","aria-live":o==="foreground"?"assertive":"polite",children:xe}),w.jsx(hx,{scope:s,onClose:Se,children:Qc.createPortal(w.jsx(Yc.ItemSlot,{scope:s,children:w.jsx(Q0,{asChild:!0,onEscapeKeyDown:jt(h,()=>{_.isFocusedToastEscapeKeyDownRef.current||Se(),_.isFocusedToastEscapeKeyDownRef.current=!1}),children:w.jsx(En.li,{tabIndex:0,"data-state":u?"open":"closed","data-swipe-direction":_.swipeDirection,...M,ref:I,style:{userSelect:"none",touchAction:"none",...n.style},onKeyDown:jt(n.onKeyDown,J=>{J.key==="Escape"&&(h==null||h(J.nativeEvent),J.nativeEvent.defaultPrevented||(_.isFocusedToastEscapeKeyDownRef.current=!0,Se()))}),onPointerDown:jt(n.onPointerDown,J=>{J.button===0&&(A.current={x:J.clientX,y:J.clientY})}),onPointerMove:jt(n.onPointerMove,J=>{if(!A.current)return;const be=J.clientX-A.current.x,Ee=J.clientY-A.current.y,_e=!!O.current,K=["left","right"].includes(_.swipeDirection),ae=["left","up"].includes(_.swipeDirection)?Math.min:Math.max,U=K?ae(0,be):0,P=K?0:ae(0,Ee),z=J.pointerType==="touch"?10:2,ce={x:U,y:P},me={originalEvent:J,delta:ce};_e?(O.current=ce,_a(cx,v,me,{discrete:!1})):Tp(ce,_.swipeDirection,z)?(O.current=ce,_a(ux,y,me,{discrete:!1}),J.target.setPointerCapture(J.pointerId)):(Math.abs(be)>z||Math.abs(Ee)>z)&&(A.current=null)}),onPointerUp:jt(n.onPointerUp,J=>{const be=O.current,Ee=J.target;if(Ee.hasPointerCapture(J.pointerId)&&Ee.releasePointerCapture(J.pointerId),O.current=null,A.current=null,be){const _e=J.currentTarget,K={originalEvent:J,delta:be};Tp(be,_.swipeDirection,_.swipeThreshold)?_a(fx,L,K,{discrete:!0}):_a(dx,k,K,{discrete:!0}),_e.addEventListener("click",ae=>ae.preventDefault(),{once:!0})}})})})}),_.viewport)})]}):null}),gx=n=>{const{__scopeToast:t,children:s,...o}=n,a=Qa(oi,t),[u,d]=b.useState(!1),[h,p]=b.useState(!1);return wx(()=>d(!0)),b.useEffect(()=>{const m=window.setTimeout(()=>p(!0),1e3);return()=>window.clearTimeout(m)},[]),h?null:w.jsx(lg,{asChild:!0,children:w.jsx(Gc,{...o,children:u&&w.jsxs(w.Fragment,{children:[a.label," ",s]})})})},yx="ToastTitle",gg=b.forwardRef((n,t)=>{const{__scopeToast:s,...o}=n;return w.jsx(En.div,{...o,ref:t})});gg.displayName=yx;var vx="ToastDescription",yg=b.forwardRef((n,t)=>{const{__scopeToast:s,...o}=n;return w.jsx(En.div,{...o,ref:t})});yg.displayName=vx;var vg="ToastAction",wg=b.forwardRef((n,t)=>{const{altText:s,...o}=n;return s.trim()?w.jsx(Sg,{altText:s,asChild:!0,children:w.jsx(Jc,{...o,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${vg}\`. Expected non-empty \`string\`.`),null)});wg.displayName=vg;var xg="ToastClose",Jc=b.forwardRef((n,t)=>{const{__scopeToast:s,...o}=n,a=px(xg,s);return w.jsx(Sg,{asChild:!0,children:w.jsx(En.button,{type:"button",...o,ref:t,onClick:jt(n.onClick,a.onClose)})})});Jc.displayName=xg;var Sg=b.forwardRef((n,t)=>{const{__scopeToast:s,altText:o,...a}=n;return w.jsx(En.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":o||void 0,...a,ref:t})});function Eg(n){const t=[];return Array.from(n.childNodes).forEach(o=>{if(o.nodeType===o.TEXT_NODE&&o.textContent&&t.push(o.textContent),xx(o)){const a=o.ariaHidden||o.hidden||o.style.display==="none",u=o.dataset.radixToastAnnounceExclude==="";if(!a)if(u){const d=o.dataset.radixToastAnnounceAlt;d&&t.push(d)}else t.push(...Eg(o))}}),t}function _a(n,t,s,{discrete:o}){const a=s.originalEvent.currentTarget,u=new CustomEvent(n,{bubbles:!0,cancelable:!0,detail:s});t&&a.addEventListener(n,t,{once:!0}),o?rg(a,u):a.dispatchEvent(u)}var Tp=(n,t,s=0)=>{const o=Math.abs(n.x),a=Math.abs(n.y),u=o>a;return t==="left"||t==="right"?u&&o>s:!u&&a>s};function wx(n=()=>{}){const t=Yr(n);Ko(()=>{let s=0,o=0;return s=window.requestAnimationFrame(()=>o=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(s),window.cancelAnimationFrame(o)}},[t])}function xx(n){return n.nodeType===n.ELEMENT_NODE}function Sx(n){const t=[],s=document.createTreeWalker(n,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const a=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||a?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;s.nextNode();)t.push(s.currentNode);return t}function Xu(n){const t=document.activeElement;return n.some(s=>s===t?!0:(s.focus(),document.activeElement!==t))}var Ex=dg,bg=hg,_g=mg,kg=gg,Cg=yg,Rg=wg,Tg=Jc;function Ag(n){var t,s,o="";if(typeof n=="string"||typeof n=="number")o+=n;else if(typeof n=="object")if(Array.isArray(n)){var a=n.length;for(t=0;ttypeof n=="boolean"?`${n}`:n===0?"0":n,Pp=Pg,bx=(n,t)=>s=>{var o;if((t==null?void 0:t.variants)==null)return Pp(n,s==null?void 0:s.class,s==null?void 0:s.className);const{variants:a,defaultVariants:u}=t,d=Object.keys(a).map(m=>{const y=s==null?void 0:s[m],v=u==null?void 0:u[m];if(y===null)return null;const k=Ap(y)||Ap(v);return a[m][k]}),h=s&&Object.entries(s).reduce((m,y)=>{let[v,k]=y;return k===void 0||(m[v]=k),m},{}),p=t==null||(o=t.compoundVariants)===null||o===void 0?void 0:o.reduce((m,y)=>{let{class:v,className:k,...L}=y;return Object.entries(L).every(M=>{let[_,x]=M;return Array.isArray(x)?x.includes({...u,...h}[_]):{...u,...h}[_]===x})?[...m,v,k]:m},[]);return Pp(n,d,p,s==null?void 0:s.class,s==null?void 0:s.className)};/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const _x=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Ng=(...n)=>n.filter((t,s,o)=>!!t&&t.trim()!==""&&o.indexOf(t)===s).join(" ").trim();/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var kx={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Cx=b.forwardRef(({color:n="currentColor",size:t=24,strokeWidth:s=2,absoluteStrokeWidth:o,className:a="",children:u,iconNode:d,...h},p)=>b.createElement("svg",{ref:p,...kx,width:t,height:t,stroke:n,strokeWidth:o?Number(s)*24/Number(t):s,className:Ng("lucide",a),...h},[...d.map(([m,y])=>b.createElement(m,y)),...Array.isArray(u)?u:[u]]));/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const un=(n,t)=>{const s=b.forwardRef(({className:o,...a},u)=>b.createElement(Cx,{ref:u,iconNode:t,className:Ng(`lucide-${_x(n)}`,o),...a}));return s.displayName=`${n}`,s};/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Rx=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Tx=un("ArrowRight",Rx);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Ax=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Px=un("Check",Ax);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Nx=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Og=un("ChevronRight",Nx);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Ox=[["path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z",key:"1jg4f8"}]],Lx=un("Facebook",Ox);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Ix=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],Fx=un("Link2",Ix);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const jx=[["path",{d:"M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z",key:"c2jq9f"}],["rect",{width:"4",height:"12",x:"2",y:"9",key:"mk3on5"}],["circle",{cx:"4",cy:"4",r:"2",key:"bt5ra8"}]],Dx=un("Linkedin",jx);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Mx=[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]],Ux=un("Mail",Mx);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const zx=[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]],Bx=un("Menu",zx);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const $x=[["path",{d:"M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2",key:"143wyd"}],["path",{d:"M6 9V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6",key:"1itne7"}],["rect",{x:"6",y:"14",width:"12",height:"8",rx:"1",key:"1ue0tg"}]],Hx=un("Printer",$x);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Vx=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],Wx=un("Search",Vx);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const qx=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Zc=un("X",qx),Qx=(n,t)=>{const s=new Array(n.length+t.length);for(let o=0;o({classGroupId:n,validator:t}),Lg=(n=new Map,t=null,s)=>({nextPart:n,validators:t,classGroupId:s}),Ba="-",Np=[],Gx="arbitrary..",Xx=n=>{const t=Jx(n),{conflictingClassGroups:s,conflictingClassGroupModifiers:o}=n;return{getClassGroupId:d=>{if(d.startsWith("[")&&d.endsWith("]"))return Yx(d);const h=d.split(Ba),p=h[0]===""&&h.length>1?1:0;return Ig(h,p,t)},getConflictingClassGroupIds:(d,h)=>{if(h){const p=o[d],m=s[d];return p?m?Qx(m,p):p:m||Np}return s[d]||Np}}},Ig=(n,t,s)=>{if(n.length-t===0)return s.classGroupId;const a=n[t],u=s.nextPart.get(a);if(u){const m=Ig(n,t+1,u);if(m)return m}const d=s.validators;if(d===null)return;const h=t===0?n.join(Ba):n.slice(t).join(Ba),p=d.length;for(let m=0;mn.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=n.slice(1,-1),s=t.indexOf(":"),o=t.slice(0,s);return o?Gx+o:void 0})(),Jx=n=>{const{theme:t,classGroups:s}=n;return Zx(s,t)},Zx=(n,t)=>{const s=Lg();for(const o in n){const a=n[o];ed(a,s,o,t)}return s},ed=(n,t,s,o)=>{const a=n.length;for(let u=0;u{if(typeof n=="string"){t1(n,t,s);return}if(typeof n=="function"){n1(n,t,s,o);return}r1(n,t,s,o)},t1=(n,t,s)=>{const o=n===""?t:Fg(t,n);o.classGroupId=s},n1=(n,t,s,o)=>{if(s1(n)){ed(n(o),t,s,o);return}t.validators===null&&(t.validators=[]),t.validators.push(Kx(s,n))},r1=(n,t,s,o)=>{const a=Object.entries(n),u=a.length;for(let d=0;d{let s=n;const o=t.split(Ba),a=o.length;for(let u=0;u"isThemeGetter"in n&&n.isThemeGetter===!0,o1=n=>{if(n<1)return{get:()=>{},set:()=>{}};let t=0,s=Object.create(null),o=Object.create(null);const a=(u,d)=>{s[u]=d,t++,t>n&&(t=0,o=s,s=Object.create(null))};return{get(u){let d=s[u];if(d!==void 0)return d;if((d=o[u])!==void 0)return a(u,d),d},set(u,d){u in s?s[u]=d:a(u,d)}}},mc="!",Op=":",i1=[],Lp=(n,t,s,o,a)=>({modifiers:n,hasImportantModifier:t,baseClassName:s,maybePostfixModifierPosition:o,isExternal:a}),a1=n=>{const{prefix:t,experimentalParseClassName:s}=n;let o=a=>{const u=[];let d=0,h=0,p=0,m;const y=a.length;for(let _=0;_p?m-p:void 0;return Lp(u,L,k,M)};if(t){const a=t+Op,u=o;o=d=>d.startsWith(a)?u(d.slice(a.length)):Lp(i1,!1,d,void 0,!0)}if(s){const a=o;o=u=>s({className:u,parseClassName:a})}return o},l1=n=>{const t=new Map;return n.orderSensitiveModifiers.forEach((s,o)=>{t.set(s,1e6+o)}),s=>{const o=[];let a=[];for(let u=0;u0&&(a.sort(),o.push(...a),a=[]),o.push(d)):a.push(d)}return a.length>0&&(a.sort(),o.push(...a)),o}},u1=n=>({cache:o1(n.cacheSize),parseClassName:a1(n),sortModifiers:l1(n),...Xx(n)}),c1=/\s+/,d1=(n,t)=>{const{parseClassName:s,getClassGroupId:o,getConflictingClassGroupIds:a,sortModifiers:u}=t,d=[],h=n.trim().split(c1);let p="";for(let m=h.length-1;m>=0;m-=1){const y=h[m],{isExternal:v,modifiers:k,hasImportantModifier:L,baseClassName:M,maybePostfixModifierPosition:_}=s(y);if(v){p=y+(p.length>0?" "+p:p);continue}let x=!!_,E=o(x?M.substring(0,_):M);if(!E){if(!x){p=y+(p.length>0?" "+p:p);continue}if(E=o(M),!E){p=y+(p.length>0?" "+p:p);continue}x=!1}const I=k.length===0?"":k.length===1?k[0]:u(k).join(":"),A=L?I+mc:I,O=A+E;if(d.indexOf(O)>-1)continue;d.push(O);const H=a(E,x);for(let $=0;$0?" "+p:p)}return p},f1=(...n)=>{let t=0,s,o,a="";for(;t{if(typeof n=="string")return n;let t,s="";for(let o=0;o{let s,o,a,u;const d=p=>{const m=t.reduce((y,v)=>v(y),n());return s=u1(m),o=s.cache.get,a=s.cache.set,u=h,h(p)},h=p=>{const m=o(p);if(m)return m;const y=d1(p,s);return a(p,y),y};return u=d,(...p)=>u(f1(...p))},p1=[],et=n=>{const t=s=>s[n]||p1;return t.isThemeGetter=!0,t},Dg=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Mg=/^\((?:(\w[\w-]*):)?(.+)\)$/i,m1=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,g1=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,y1=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,v1=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,w1=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,x1=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,sr=n=>m1.test(n),ke=n=>!!n&&!Number.isNaN(Number(n)),or=n=>!!n&&Number.isInteger(Number(n)),Yu=n=>n.endsWith("%")&&ke(n.slice(0,-1)),On=n=>g1.test(n),Ug=()=>!0,S1=n=>y1.test(n)&&!v1.test(n),td=()=>!1,E1=n=>w1.test(n),b1=n=>x1.test(n),_1=n=>!re(n)&&!se(n),k1=n=>xr(n,$g,td),re=n=>Dg.test(n),Ir=n=>xr(n,Hg,S1),Ip=n=>xr(n,L1,ke),C1=n=>xr(n,Wg,Ug),R1=n=>xr(n,Vg,td),Fp=n=>xr(n,zg,td),T1=n=>xr(n,Bg,b1),ka=n=>xr(n,qg,E1),se=n=>Mg.test(n),jo=n=>ts(n,Hg),A1=n=>ts(n,Vg),jp=n=>ts(n,zg),P1=n=>ts(n,$g),N1=n=>ts(n,Bg),Ca=n=>ts(n,qg,!0),O1=n=>ts(n,Wg,!0),xr=(n,t,s)=>{const o=Dg.exec(n);return o?o[1]?t(o[1]):s(o[2]):!1},ts=(n,t,s=!1)=>{const o=Mg.exec(n);return o?o[1]?t(o[1]):s:!1},zg=n=>n==="position"||n==="percentage",Bg=n=>n==="image"||n==="url",$g=n=>n==="length"||n==="size"||n==="bg-size",Hg=n=>n==="length",L1=n=>n==="number",Vg=n=>n==="family-name",Wg=n=>n==="number"||n==="weight",qg=n=>n==="shadow",I1=()=>{const n=et("color"),t=et("font"),s=et("text"),o=et("font-weight"),a=et("tracking"),u=et("leading"),d=et("breakpoint"),h=et("container"),p=et("spacing"),m=et("radius"),y=et("shadow"),v=et("inset-shadow"),k=et("text-shadow"),L=et("drop-shadow"),M=et("blur"),_=et("perspective"),x=et("aspect"),E=et("ease"),I=et("animate"),A=()=>["auto","avoid","all","avoid-page","page","left","right","column"],O=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],H=()=>[...O(),se,re],$=()=>["auto","hidden","clip","visible","scroll"],G=()=>["auto","contain","none"],B=()=>[se,re,p],ie=()=>[sr,"full","auto",...B()],ue=()=>[or,"none","subgrid",se,re],Se=()=>["auto",{span:["full",or,se,re]},or,se,re],Te=()=>[or,"auto",se,re],xe=()=>["auto","min","max","fr",se,re],J=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],be=()=>["start","end","center","stretch","center-safe","end-safe"],Ee=()=>["auto",...B()],_e=()=>[sr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...B()],K=()=>[sr,"screen","full","dvw","lvw","svw","min","max","fit",...B()],ae=()=>[sr,"screen","full","lh","dvh","lvh","svh","min","max","fit",...B()],U=()=>[n,se,re],P=()=>[...O(),jp,Fp,{position:[se,re]}],z=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ce=()=>["auto","cover","contain",P1,k1,{size:[se,re]}],me=()=>[Yu,jo,Ir],he=()=>["","none","full",m,se,re],X=()=>["",ke,jo,Ir],ve=()=>["solid","dashed","dotted","double"],Re=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ye=()=>[ke,Yu,jp,Fp],tt=()=>["","none",M,se,re],Dt=()=>["none",ke,se,re],it=()=>["none",ke,se,re],Gt=()=>[ke,se,re],Mt=()=>[sr,"full",...B()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[On],breakpoint:[On],color:[Ug],container:[On],"drop-shadow":[On],ease:["in","out","in-out"],font:[_1],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[On],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[On],shadow:[On],spacing:["px",ke],text:[On],"text-shadow":[On],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",sr,re,se,x]}],container:["container"],columns:[{columns:[ke,re,se,h]}],"break-after":[{"break-after":A()}],"break-before":[{"break-before":A()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:H()}],overflow:[{overflow:$()}],"overflow-x":[{"overflow-x":$()}],"overflow-y":[{"overflow-y":$()}],overscroll:[{overscroll:G()}],"overscroll-x":[{"overscroll-x":G()}],"overscroll-y":[{"overscroll-y":G()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:ie()}],"inset-x":[{"inset-x":ie()}],"inset-y":[{"inset-y":ie()}],start:[{"inset-s":ie(),start:ie()}],end:[{"inset-e":ie(),end:ie()}],"inset-bs":[{"inset-bs":ie()}],"inset-be":[{"inset-be":ie()}],top:[{top:ie()}],right:[{right:ie()}],bottom:[{bottom:ie()}],left:[{left:ie()}],visibility:["visible","invisible","collapse"],z:[{z:[or,"auto",se,re]}],basis:[{basis:[sr,"full","auto",h,...B()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ke,sr,"auto","initial","none",re]}],grow:[{grow:["",ke,se,re]}],shrink:[{shrink:["",ke,se,re]}],order:[{order:[or,"first","last","none",se,re]}],"grid-cols":[{"grid-cols":ue()}],"col-start-end":[{col:Se()}],"col-start":[{"col-start":Te()}],"col-end":[{"col-end":Te()}],"grid-rows":[{"grid-rows":ue()}],"row-start-end":[{row:Se()}],"row-start":[{"row-start":Te()}],"row-end":[{"row-end":Te()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":xe()}],"auto-rows":[{"auto-rows":xe()}],gap:[{gap:B()}],"gap-x":[{"gap-x":B()}],"gap-y":[{"gap-y":B()}],"justify-content":[{justify:[...J(),"normal"]}],"justify-items":[{"justify-items":[...be(),"normal"]}],"justify-self":[{"justify-self":["auto",...be()]}],"align-content":[{content:["normal",...J()]}],"align-items":[{items:[...be(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...be(),{baseline:["","last"]}]}],"place-content":[{"place-content":J()}],"place-items":[{"place-items":[...be(),"baseline"]}],"place-self":[{"place-self":["auto",...be()]}],p:[{p:B()}],px:[{px:B()}],py:[{py:B()}],ps:[{ps:B()}],pe:[{pe:B()}],pbs:[{pbs:B()}],pbe:[{pbe:B()}],pt:[{pt:B()}],pr:[{pr:B()}],pb:[{pb:B()}],pl:[{pl:B()}],m:[{m:Ee()}],mx:[{mx:Ee()}],my:[{my:Ee()}],ms:[{ms:Ee()}],me:[{me:Ee()}],mbs:[{mbs:Ee()}],mbe:[{mbe:Ee()}],mt:[{mt:Ee()}],mr:[{mr:Ee()}],mb:[{mb:Ee()}],ml:[{ml:Ee()}],"space-x":[{"space-x":B()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":B()}],"space-y-reverse":["space-y-reverse"],size:[{size:_e()}],"inline-size":[{inline:["auto",...K()]}],"min-inline-size":[{"min-inline":["auto",...K()]}],"max-inline-size":[{"max-inline":["none",...K()]}],"block-size":[{block:["auto",...ae()]}],"min-block-size":[{"min-block":["auto",...ae()]}],"max-block-size":[{"max-block":["none",...ae()]}],w:[{w:[h,"screen",..._e()]}],"min-w":[{"min-w":[h,"screen","none",..._e()]}],"max-w":[{"max-w":[h,"screen","none","prose",{screen:[d]},..._e()]}],h:[{h:["screen","lh",..._e()]}],"min-h":[{"min-h":["screen","lh","none",..._e()]}],"max-h":[{"max-h":["screen","lh",..._e()]}],"font-size":[{text:["base",s,jo,Ir]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,O1,C1]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Yu,re]}],"font-family":[{font:[A1,R1,t]}],"font-features":[{"font-features":[re]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[a,se,re]}],"line-clamp":[{"line-clamp":[ke,"none",se,Ip]}],leading:[{leading:[u,...B()]}],"list-image":[{"list-image":["none",se,re]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",se,re]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:U()}],"text-color":[{text:U()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ve(),"wavy"]}],"text-decoration-thickness":[{decoration:[ke,"from-font","auto",se,Ir]}],"text-decoration-color":[{decoration:U()}],"underline-offset":[{"underline-offset":[ke,"auto",se,re]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:B()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",se,re]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",se,re]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:P()}],"bg-repeat":[{bg:z()}],"bg-size":[{bg:ce()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},or,se,re],radial:["",se,re],conic:[or,se,re]},N1,T1]}],"bg-color":[{bg:U()}],"gradient-from-pos":[{from:me()}],"gradient-via-pos":[{via:me()}],"gradient-to-pos":[{to:me()}],"gradient-from":[{from:U()}],"gradient-via":[{via:U()}],"gradient-to":[{to:U()}],rounded:[{rounded:he()}],"rounded-s":[{"rounded-s":he()}],"rounded-e":[{"rounded-e":he()}],"rounded-t":[{"rounded-t":he()}],"rounded-r":[{"rounded-r":he()}],"rounded-b":[{"rounded-b":he()}],"rounded-l":[{"rounded-l":he()}],"rounded-ss":[{"rounded-ss":he()}],"rounded-se":[{"rounded-se":he()}],"rounded-ee":[{"rounded-ee":he()}],"rounded-es":[{"rounded-es":he()}],"rounded-tl":[{"rounded-tl":he()}],"rounded-tr":[{"rounded-tr":he()}],"rounded-br":[{"rounded-br":he()}],"rounded-bl":[{"rounded-bl":he()}],"border-w":[{border:X()}],"border-w-x":[{"border-x":X()}],"border-w-y":[{"border-y":X()}],"border-w-s":[{"border-s":X()}],"border-w-e":[{"border-e":X()}],"border-w-bs":[{"border-bs":X()}],"border-w-be":[{"border-be":X()}],"border-w-t":[{"border-t":X()}],"border-w-r":[{"border-r":X()}],"border-w-b":[{"border-b":X()}],"border-w-l":[{"border-l":X()}],"divide-x":[{"divide-x":X()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":X()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ve(),"hidden","none"]}],"divide-style":[{divide:[...ve(),"hidden","none"]}],"border-color":[{border:U()}],"border-color-x":[{"border-x":U()}],"border-color-y":[{"border-y":U()}],"border-color-s":[{"border-s":U()}],"border-color-e":[{"border-e":U()}],"border-color-bs":[{"border-bs":U()}],"border-color-be":[{"border-be":U()}],"border-color-t":[{"border-t":U()}],"border-color-r":[{"border-r":U()}],"border-color-b":[{"border-b":U()}],"border-color-l":[{"border-l":U()}],"divide-color":[{divide:U()}],"outline-style":[{outline:[...ve(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ke,se,re]}],"outline-w":[{outline:["",ke,jo,Ir]}],"outline-color":[{outline:U()}],shadow:[{shadow:["","none",y,Ca,ka]}],"shadow-color":[{shadow:U()}],"inset-shadow":[{"inset-shadow":["none",v,Ca,ka]}],"inset-shadow-color":[{"inset-shadow":U()}],"ring-w":[{ring:X()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:U()}],"ring-offset-w":[{"ring-offset":[ke,Ir]}],"ring-offset-color":[{"ring-offset":U()}],"inset-ring-w":[{"inset-ring":X()}],"inset-ring-color":[{"inset-ring":U()}],"text-shadow":[{"text-shadow":["none",k,Ca,ka]}],"text-shadow-color":[{"text-shadow":U()}],opacity:[{opacity:[ke,se,re]}],"mix-blend":[{"mix-blend":[...Re(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Re()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ke]}],"mask-image-linear-from-pos":[{"mask-linear-from":ye()}],"mask-image-linear-to-pos":[{"mask-linear-to":ye()}],"mask-image-linear-from-color":[{"mask-linear-from":U()}],"mask-image-linear-to-color":[{"mask-linear-to":U()}],"mask-image-t-from-pos":[{"mask-t-from":ye()}],"mask-image-t-to-pos":[{"mask-t-to":ye()}],"mask-image-t-from-color":[{"mask-t-from":U()}],"mask-image-t-to-color":[{"mask-t-to":U()}],"mask-image-r-from-pos":[{"mask-r-from":ye()}],"mask-image-r-to-pos":[{"mask-r-to":ye()}],"mask-image-r-from-color":[{"mask-r-from":U()}],"mask-image-r-to-color":[{"mask-r-to":U()}],"mask-image-b-from-pos":[{"mask-b-from":ye()}],"mask-image-b-to-pos":[{"mask-b-to":ye()}],"mask-image-b-from-color":[{"mask-b-from":U()}],"mask-image-b-to-color":[{"mask-b-to":U()}],"mask-image-l-from-pos":[{"mask-l-from":ye()}],"mask-image-l-to-pos":[{"mask-l-to":ye()}],"mask-image-l-from-color":[{"mask-l-from":U()}],"mask-image-l-to-color":[{"mask-l-to":U()}],"mask-image-x-from-pos":[{"mask-x-from":ye()}],"mask-image-x-to-pos":[{"mask-x-to":ye()}],"mask-image-x-from-color":[{"mask-x-from":U()}],"mask-image-x-to-color":[{"mask-x-to":U()}],"mask-image-y-from-pos":[{"mask-y-from":ye()}],"mask-image-y-to-pos":[{"mask-y-to":ye()}],"mask-image-y-from-color":[{"mask-y-from":U()}],"mask-image-y-to-color":[{"mask-y-to":U()}],"mask-image-radial":[{"mask-radial":[se,re]}],"mask-image-radial-from-pos":[{"mask-radial-from":ye()}],"mask-image-radial-to-pos":[{"mask-radial-to":ye()}],"mask-image-radial-from-color":[{"mask-radial-from":U()}],"mask-image-radial-to-color":[{"mask-radial-to":U()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":O()}],"mask-image-conic-pos":[{"mask-conic":[ke]}],"mask-image-conic-from-pos":[{"mask-conic-from":ye()}],"mask-image-conic-to-pos":[{"mask-conic-to":ye()}],"mask-image-conic-from-color":[{"mask-conic-from":U()}],"mask-image-conic-to-color":[{"mask-conic-to":U()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:P()}],"mask-repeat":[{mask:z()}],"mask-size":[{mask:ce()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",se,re]}],filter:[{filter:["","none",se,re]}],blur:[{blur:tt()}],brightness:[{brightness:[ke,se,re]}],contrast:[{contrast:[ke,se,re]}],"drop-shadow":[{"drop-shadow":["","none",L,Ca,ka]}],"drop-shadow-color":[{"drop-shadow":U()}],grayscale:[{grayscale:["",ke,se,re]}],"hue-rotate":[{"hue-rotate":[ke,se,re]}],invert:[{invert:["",ke,se,re]}],saturate:[{saturate:[ke,se,re]}],sepia:[{sepia:["",ke,se,re]}],"backdrop-filter":[{"backdrop-filter":["","none",se,re]}],"backdrop-blur":[{"backdrop-blur":tt()}],"backdrop-brightness":[{"backdrop-brightness":[ke,se,re]}],"backdrop-contrast":[{"backdrop-contrast":[ke,se,re]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ke,se,re]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ke,se,re]}],"backdrop-invert":[{"backdrop-invert":["",ke,se,re]}],"backdrop-opacity":[{"backdrop-opacity":[ke,se,re]}],"backdrop-saturate":[{"backdrop-saturate":[ke,se,re]}],"backdrop-sepia":[{"backdrop-sepia":["",ke,se,re]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":B()}],"border-spacing-x":[{"border-spacing-x":B()}],"border-spacing-y":[{"border-spacing-y":B()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",se,re]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ke,"initial",se,re]}],ease:[{ease:["linear","initial",E,se,re]}],delay:[{delay:[ke,se,re]}],animate:[{animate:["none",I,se,re]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[_,se,re]}],"perspective-origin":[{"perspective-origin":H()}],rotate:[{rotate:Dt()}],"rotate-x":[{"rotate-x":Dt()}],"rotate-y":[{"rotate-y":Dt()}],"rotate-z":[{"rotate-z":Dt()}],scale:[{scale:it()}],"scale-x":[{"scale-x":it()}],"scale-y":[{"scale-y":it()}],"scale-z":[{"scale-z":it()}],"scale-3d":["scale-3d"],skew:[{skew:Gt()}],"skew-x":[{"skew-x":Gt()}],"skew-y":[{"skew-y":Gt()}],transform:[{transform:[se,re,"","none","gpu","cpu"]}],"transform-origin":[{origin:H()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Mt()}],"translate-x":[{"translate-x":Mt()}],"translate-y":[{"translate-y":Mt()}],"translate-z":[{"translate-z":Mt()}],"translate-none":["translate-none"],accent:[{accent:U()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:U()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",se,re]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":B()}],"scroll-mx":[{"scroll-mx":B()}],"scroll-my":[{"scroll-my":B()}],"scroll-ms":[{"scroll-ms":B()}],"scroll-me":[{"scroll-me":B()}],"scroll-mbs":[{"scroll-mbs":B()}],"scroll-mbe":[{"scroll-mbe":B()}],"scroll-mt":[{"scroll-mt":B()}],"scroll-mr":[{"scroll-mr":B()}],"scroll-mb":[{"scroll-mb":B()}],"scroll-ml":[{"scroll-ml":B()}],"scroll-p":[{"scroll-p":B()}],"scroll-px":[{"scroll-px":B()}],"scroll-py":[{"scroll-py":B()}],"scroll-ps":[{"scroll-ps":B()}],"scroll-pe":[{"scroll-pe":B()}],"scroll-pbs":[{"scroll-pbs":B()}],"scroll-pbe":[{"scroll-pbe":B()}],"scroll-pt":[{"scroll-pt":B()}],"scroll-pr":[{"scroll-pr":B()}],"scroll-pb":[{"scroll-pb":B()}],"scroll-pl":[{"scroll-pl":B()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",se,re]}],fill:[{fill:["none",...U()]}],"stroke-w":[{stroke:[ke,jo,Ir,Ip]}],stroke:[{stroke:["none",...U()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},F1=h1(I1);function Vs(...n){return F1(Pg(n))}const j1=Ex,Qg=b.forwardRef(({className:n,...t},s)=>w.jsx(bg,{ref:s,className:Vs("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",n),...t}));Qg.displayName=bg.displayName;const D1=bx("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),Kg=b.forwardRef(({className:n,variant:t,...s},o)=>w.jsx(_g,{ref:o,className:Vs(D1({variant:t}),n),...s}));Kg.displayName=_g.displayName;const M1=b.forwardRef(({className:n,...t},s)=>w.jsx(Rg,{ref:s,className:Vs("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",n),...t}));M1.displayName=Rg.displayName;const Gg=b.forwardRef(({className:n,...t},s)=>w.jsx(Tg,{ref:s,className:Vs("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",n),"toast-close":"",...t,children:w.jsx(Zc,{className:"h-4 w-4"})}));Gg.displayName=Tg.displayName;const Xg=b.forwardRef(({className:n,...t},s)=>w.jsx(kg,{ref:s,className:Vs("text-sm font-semibold",n),...t}));Xg.displayName=kg.displayName;const Yg=b.forwardRef(({className:n,...t},s)=>w.jsx(Cg,{ref:s,className:Vs("text-sm opacity-90",n),...t}));Yg.displayName=Cg.displayName;function U1(){const{toasts:n}=_0();return w.jsxs(j1,{children:[n.map(function({id:t,title:s,description:o,action:a,...u}){return w.jsxs(Kg,{...u,children:[w.jsxs("div",{className:"grid gap-1",children:[s&&w.jsx(Xg,{children:s}),o&&w.jsx(Yg,{children:o})]}),a,w.jsx(Gg,{})]},t)}),w.jsx(Qg,{})]})}var ii=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(n){return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},z1={setTimeout:(n,t)=>setTimeout(n,t),clearTimeout:n=>clearTimeout(n),setInterval:(n,t)=>setInterval(n,t),clearInterval:n=>clearInterval(n)},lr,Vc,Hm,B1=(Hm=class{constructor(){pe(this,lr,z1);pe(this,Vc,!1)}setTimeoutProvider(n){ee(this,lr,n)}setTimeout(n,t){return R(this,lr).setTimeout(n,t)}clearTimeout(n){R(this,lr).clearTimeout(n)}setInterval(n,t){return R(this,lr).setInterval(n,t)}clearInterval(n){R(this,lr).clearInterval(n)}},lr=new WeakMap,Vc=new WeakMap,Hm),Dr=new B1;function $1(n){setTimeout(n,0)}var Jr=typeof window>"u"||"Deno"in globalThis;function Pt(){}function H1(n,t){return typeof n=="function"?n(t):n}function gc(n){return typeof n=="number"&&n>=0&&n!==1/0}function Jg(n,t){return Math.max(n+(t||0)-Date.now(),0)}function yr(n,t){return typeof n=="function"?n(t):n}function Qt(n,t){return typeof n=="function"?n(t):n}function Dp(n,t){const{type:s="all",exact:o,fetchStatus:a,predicate:u,queryKey:d,stale:h}=n;if(d){if(o){if(t.queryHash!==nd(d,t.options))return!1}else if(!Xo(t.queryKey,d))return!1}if(s!=="all"){const p=t.isActive();if(s==="active"&&!p||s==="inactive"&&p)return!1}return!(typeof h=="boolean"&&t.isStale()!==h||a&&a!==t.state.fetchStatus||u&&!u(t))}function Mp(n,t){const{exact:s,status:o,predicate:a,mutationKey:u}=n;if(u){if(!t.options.mutationKey)return!1;if(s){if(Go(t.options.mutationKey)!==Go(u))return!1}else if(!Xo(t.options.mutationKey,u))return!1}return!(o&&t.state.status!==o||a&&!a(t))}function nd(n,t){return((t==null?void 0:t.queryKeyHashFn)||Go)(n)}function Go(n){return JSON.stringify(n,(t,s)=>vc(s)?Object.keys(s).sort().reduce((o,a)=>(o[a]=s[a],o),{}):s)}function Xo(n,t){return n===t?!0:typeof n!=typeof t?!1:n&&t&&typeof n=="object"&&typeof t=="object"?Object.keys(t).every(s=>Xo(n[s],t[s])):!1}var V1=Object.prototype.hasOwnProperty;function Zg(n,t,s=0){if(n===t)return n;if(s>500)return t;const o=Up(n)&&Up(t);if(!o&&!(vc(n)&&vc(t)))return t;const u=(o?n:Object.keys(n)).length,d=o?t:Object.keys(t),h=d.length,p=o?new Array(h):{};let m=0;for(let y=0;y{Dr.setTimeout(t,n)})}function wc(n,t,s){return typeof s.structuralSharing=="function"?s.structuralSharing(n,t):s.structuralSharing!==!1?Zg(n,t):t}function q1(n,t,s=0){const o=[...n,t];return s&&o.length>s?o.slice(1):o}function Q1(n,t,s=0){const o=[t,...n];return s&&o.length>s?o.slice(0,-1):o}var rd=Symbol();function ey(n,t){return!n.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!n.queryFn||n.queryFn===rd?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}function ty(n,t){return typeof n=="function"?n(...t):!!n}function K1(n,t,s){let o=!1,a;return Object.defineProperty(n,"signal",{enumerable:!0,get:()=>(a??(a=t()),o||(o=!0,a.aborted?s():a.addEventListener("abort",s,{once:!0})),a)}),n}var Ur,ur,Ps,Vm,G1=(Vm=class extends ii{constructor(){super();pe(this,Ur);pe(this,ur);pe(this,Ps);ee(this,Ps,t=>{if(!Jr&&window.addEventListener){const s=()=>t();return window.addEventListener("visibilitychange",s,!1),()=>{window.removeEventListener("visibilitychange",s)}}})}onSubscribe(){R(this,ur)||this.setEventListener(R(this,Ps))}onUnsubscribe(){var t;this.hasListeners()||((t=R(this,ur))==null||t.call(this),ee(this,ur,void 0))}setEventListener(t){var s;ee(this,Ps,t),(s=R(this,ur))==null||s.call(this),ee(this,ur,t(o=>{typeof o=="boolean"?this.setFocused(o):this.onFocus()}))}setFocused(t){R(this,Ur)!==t&&(ee(this,Ur,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(s=>{s(t)})}isFocused(){var t;return typeof R(this,Ur)=="boolean"?R(this,Ur):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Ur=new WeakMap,ur=new WeakMap,Ps=new WeakMap,Vm),sd=new G1;function xc(){let n,t;const s=new Promise((a,u)=>{n=a,t=u});s.status="pending",s.catch(()=>{});function o(a){Object.assign(s,a),delete s.resolve,delete s.reject}return s.resolve=a=>{o({status:"fulfilled",value:a}),n(a)},s.reject=a=>{o({status:"rejected",reason:a}),t(a)},s}var X1=$1;function Y1(){let n=[],t=0,s=h=>{h()},o=h=>{h()},a=X1;const u=h=>{t?n.push(h):a(()=>{s(h)})},d=()=>{const h=n;n=[],h.length&&a(()=>{o(()=>{h.forEach(p=>{s(p)})})})};return{batch:h=>{let p;t++;try{p=h()}finally{t--,t||d()}return p},batchCalls:h=>(...p)=>{u(()=>{h(...p)})},schedule:u,setNotifyFunction:h=>{s=h},setBatchNotifyFunction:h=>{o=h},setScheduler:h=>{a=h}}}var dt=Y1(),Ns,cr,Os,Wm,J1=(Wm=class extends ii{constructor(){super();pe(this,Ns,!0);pe(this,cr);pe(this,Os);ee(this,Os,t=>{if(!Jr&&window.addEventListener){const s=()=>t(!0),o=()=>t(!1);return window.addEventListener("online",s,!1),window.addEventListener("offline",o,!1),()=>{window.removeEventListener("online",s),window.removeEventListener("offline",o)}}})}onSubscribe(){R(this,cr)||this.setEventListener(R(this,Os))}onUnsubscribe(){var t;this.hasListeners()||((t=R(this,cr))==null||t.call(this),ee(this,cr,void 0))}setEventListener(t){var s;ee(this,Os,t),(s=R(this,cr))==null||s.call(this),ee(this,cr,t(this.setOnline.bind(this)))}setOnline(t){R(this,Ns)!==t&&(ee(this,Ns,t),this.listeners.forEach(o=>{o(t)}))}isOnline(){return R(this,Ns)}},Ns=new WeakMap,cr=new WeakMap,Os=new WeakMap,Wm),$a=new J1;function Z1(n){return Math.min(1e3*2**n,3e4)}function ny(n){return(n??"online")==="online"?$a.isOnline():!0}var Sc=class extends Error{constructor(n){super("CancelledError"),this.revert=n==null?void 0:n.revert,this.silent=n==null?void 0:n.silent}};function ry(n){let t=!1,s=0,o;const a=xc(),u=()=>a.status!=="pending",d=_=>{var x;if(!u()){const E=new Sc(_);k(E),(x=n.onCancel)==null||x.call(n,E)}},h=()=>{t=!0},p=()=>{t=!1},m=()=>sd.isFocused()&&(n.networkMode==="always"||$a.isOnline())&&n.canRun(),y=()=>ny(n.networkMode)&&n.canRun(),v=_=>{u()||(o==null||o(),a.resolve(_))},k=_=>{u()||(o==null||o(),a.reject(_))},L=()=>new Promise(_=>{var x;o=E=>{(u()||m())&&_(E)},(x=n.onPause)==null||x.call(n)}).then(()=>{var _;o=void 0,u()||(_=n.onContinue)==null||_.call(n)}),M=()=>{if(u())return;let _;const x=s===0?n.initialPromise:void 0;try{_=x??n.fn()}catch(E){_=Promise.reject(E)}Promise.resolve(_).then(v).catch(E=>{var $;if(u())return;const I=n.retry??(Jr?0:3),A=n.retryDelay??Z1,O=typeof A=="function"?A(s,E):A,H=I===!0||typeof I=="number"&&sm()?void 0:L()).then(()=>{t?k(E):M()})})};return{promise:a,status:()=>a.status,cancel:d,continue:()=>(o==null||o(),a),cancelRetry:h,continueRetry:p,canStart:y,start:()=>(y()?M():L().then(M),a)}}var zr,qm,sy=(qm=class{constructor(){pe(this,zr)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),gc(this.gcTime)&&ee(this,zr,Dr.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(Jr?1/0:300*1e3))}clearGcTimeout(){R(this,zr)&&(Dr.clearTimeout(R(this,zr)),ee(this,zr,void 0))}},zr=new WeakMap,qm),Br,Ls,qt,$r,ot,ei,Hr,on,Ln,Qm,eS=(Qm=class extends sy{constructor(t){super();pe(this,on);pe(this,Br);pe(this,Ls);pe(this,qt);pe(this,$r);pe(this,ot);pe(this,ei);pe(this,Hr);ee(this,Hr,!1),ee(this,ei,t.defaultOptions),this.setOptions(t.options),this.observers=[],ee(this,$r,t.client),ee(this,qt,R(this,$r).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ee(this,Br,$p(this.options)),this.state=t.state??R(this,Br),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=R(this,ot))==null?void 0:t.promise}setOptions(t){if(this.options={...R(this,ei),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const s=$p(this.options);s.data!==void 0&&(this.setState(Bp(s.data,s.dataUpdatedAt)),ee(this,Br,s))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&R(this,qt).remove(this)}setData(t,s){const o=wc(this.state.data,t,this.options);return Ae(this,on,Ln).call(this,{data:o,type:"success",dataUpdatedAt:s==null?void 0:s.updatedAt,manual:s==null?void 0:s.manual}),o}setState(t,s){Ae(this,on,Ln).call(this,{type:"setState",state:t,setStateOptions:s})}cancel(t){var o,a;const s=(o=R(this,ot))==null?void 0:o.promise;return(a=R(this,ot))==null||a.cancel(t),s?s.then(Pt).catch(Pt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(R(this,Br))}isActive(){return this.observers.some(t=>Qt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===rd||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>yr(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!Jg(this.state.dataUpdatedAt,t)}onFocus(){var s;const t=this.observers.find(o=>o.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(s=R(this,ot))==null||s.continue()}onOnline(){var s;const t=this.observers.find(o=>o.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(s=R(this,ot))==null||s.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),R(this,qt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(s=>s!==t),this.observers.length||(R(this,ot)&&(R(this,Hr)?R(this,ot).cancel({revert:!0}):R(this,ot).cancelRetry()),this.scheduleGc()),R(this,qt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ae(this,on,Ln).call(this,{type:"invalidate"})}async fetch(t,s){var p,m,y,v,k,L,M,_,x,E,I,A;if(this.state.fetchStatus!=="idle"&&((p=R(this,ot))==null?void 0:p.status())!=="rejected"){if(this.state.data!==void 0&&(s!=null&&s.cancelRefetch))this.cancel({silent:!0});else if(R(this,ot))return R(this,ot).continueRetry(),R(this,ot).promise}if(t&&this.setOptions(t),!this.options.queryFn){const O=this.observers.find(H=>H.options.queryFn);O&&this.setOptions(O.options)}const o=new AbortController,a=O=>{Object.defineProperty(O,"signal",{enumerable:!0,get:()=>(ee(this,Hr,!0),o.signal)})},u=()=>{const O=ey(this.options,s),$=(()=>{const G={client:R(this,$r),queryKey:this.queryKey,meta:this.meta};return a(G),G})();return ee(this,Hr,!1),this.options.persister?this.options.persister(O,$,this):O($)},h=(()=>{const O={fetchOptions:s,options:this.options,queryKey:this.queryKey,client:R(this,$r),state:this.state,fetchFn:u};return a(O),O})();(m=this.options.behavior)==null||m.onFetch(h,this),ee(this,Ls,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((y=h.fetchOptions)==null?void 0:y.meta))&&Ae(this,on,Ln).call(this,{type:"fetch",meta:(v=h.fetchOptions)==null?void 0:v.meta}),ee(this,ot,ry({initialPromise:s==null?void 0:s.initialPromise,fn:h.fetchFn,onCancel:O=>{O instanceof Sc&&O.revert&&this.setState({...R(this,Ls),fetchStatus:"idle"}),o.abort()},onFail:(O,H)=>{Ae(this,on,Ln).call(this,{type:"failed",failureCount:O,error:H})},onPause:()=>{Ae(this,on,Ln).call(this,{type:"pause"})},onContinue:()=>{Ae(this,on,Ln).call(this,{type:"continue"})},retry:h.options.retry,retryDelay:h.options.retryDelay,networkMode:h.options.networkMode,canRun:()=>!0}));try{const O=await R(this,ot).start();if(O===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(O),(L=(k=R(this,qt).config).onSuccess)==null||L.call(k,O,this),(_=(M=R(this,qt).config).onSettled)==null||_.call(M,O,this.state.error,this),O}catch(O){if(O instanceof Sc){if(O.silent)return R(this,ot).promise;if(O.revert){if(this.state.data===void 0)throw O;return this.state.data}}throw Ae(this,on,Ln).call(this,{type:"error",error:O}),(E=(x=R(this,qt).config).onError)==null||E.call(x,O,this),(A=(I=R(this,qt).config).onSettled)==null||A.call(I,this.state.data,O,this),O}finally{this.scheduleGc()}}},Br=new WeakMap,Ls=new WeakMap,qt=new WeakMap,$r=new WeakMap,ot=new WeakMap,ei=new WeakMap,Hr=new WeakMap,on=new WeakSet,Ln=function(t){const s=o=>{switch(t.type){case"failed":return{...o,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...o,fetchStatus:"paused"};case"continue":return{...o,fetchStatus:"fetching"};case"fetch":return{...o,...oy(o.data,this.options),fetchMeta:t.meta??null};case"success":const a={...o,...Bp(t.data,t.dataUpdatedAt),dataUpdateCount:o.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ee(this,Ls,t.manual?a:void 0),a;case"error":const u=t.error;return{...o,error:u,errorUpdateCount:o.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:o.fetchFailureCount+1,fetchFailureReason:u,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...o,isInvalidated:!0};case"setState":return{...o,...t.state}}};this.state=s(this.state),dt.batch(()=>{this.observers.forEach(o=>{o.onQueryUpdate()}),R(this,qt).notify({query:this,type:"updated",action:t})})},Qm);function oy(n,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ny(t.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function Bp(n,t){return{data:n,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function $p(n){const t=typeof n.initialData=="function"?n.initialData():n.initialData,s=t!==void 0,o=s?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:s?o??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var At,Pe,ti,Et,Vr,Is,In,dr,ni,Fs,js,Wr,qr,fr,Ds,Fe,Bo,Ec,bc,_c,kc,Cc,Rc,Tc,iy,Km,tS=(Km=class extends ii{constructor(t,s){super();pe(this,Fe);pe(this,At);pe(this,Pe);pe(this,ti);pe(this,Et);pe(this,Vr);pe(this,Is);pe(this,In);pe(this,dr);pe(this,ni);pe(this,Fs);pe(this,js);pe(this,Wr);pe(this,qr);pe(this,fr);pe(this,Ds,new Set);this.options=s,ee(this,At,t),ee(this,dr,null),ee(this,In,xc()),this.bindMethods(),this.setOptions(s)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(R(this,Pe).addObserver(this),Hp(R(this,Pe),this.options)?Ae(this,Fe,Bo).call(this):this.updateResult(),Ae(this,Fe,kc).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ac(R(this,Pe),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ac(R(this,Pe),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ae(this,Fe,Cc).call(this),Ae(this,Fe,Rc).call(this),R(this,Pe).removeObserver(this)}setOptions(t){const s=this.options,o=R(this,Pe);if(this.options=R(this,At).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Qt(this.options.enabled,R(this,Pe))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ae(this,Fe,Tc).call(this),R(this,Pe).setOptions(this.options),s._defaulted&&!yc(this.options,s)&&R(this,At).getQueryCache().notify({type:"observerOptionsUpdated",query:R(this,Pe),observer:this});const a=this.hasListeners();a&&Vp(R(this,Pe),o,this.options,s)&&Ae(this,Fe,Bo).call(this),this.updateResult(),a&&(R(this,Pe)!==o||Qt(this.options.enabled,R(this,Pe))!==Qt(s.enabled,R(this,Pe))||yr(this.options.staleTime,R(this,Pe))!==yr(s.staleTime,R(this,Pe)))&&Ae(this,Fe,Ec).call(this);const u=Ae(this,Fe,bc).call(this);a&&(R(this,Pe)!==o||Qt(this.options.enabled,R(this,Pe))!==Qt(s.enabled,R(this,Pe))||u!==R(this,fr))&&Ae(this,Fe,_c).call(this,u)}getOptimisticResult(t){const s=R(this,At).getQueryCache().build(R(this,At),t),o=this.createResult(s,t);return rS(this,o)&&(ee(this,Et,o),ee(this,Is,this.options),ee(this,Vr,R(this,Pe).state)),o}getCurrentResult(){return R(this,Et)}trackResult(t,s){return new Proxy(t,{get:(o,a)=>(this.trackProp(a),s==null||s(a),a==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&R(this,In).status==="pending"&&R(this,In).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(o,a))})}trackProp(t){R(this,Ds).add(t)}getCurrentQuery(){return R(this,Pe)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const s=R(this,At).defaultQueryOptions(t),o=R(this,At).getQueryCache().build(R(this,At),s);return o.fetch().then(()=>this.createResult(o,s))}fetch(t){return Ae(this,Fe,Bo).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),R(this,Et)))}createResult(t,s){var ie;const o=R(this,Pe),a=this.options,u=R(this,Et),d=R(this,Vr),h=R(this,Is),m=t!==o?t.state:R(this,ti),{state:y}=t;let v={...y},k=!1,L;if(s._optimisticResults){const ue=this.hasListeners(),Se=!ue&&Hp(t,s),Te=ue&&Vp(t,o,s,a);(Se||Te)&&(v={...v,...oy(y.data,t.options)}),s._optimisticResults==="isRestoring"&&(v.fetchStatus="idle")}let{error:M,errorUpdatedAt:_,status:x}=v;L=v.data;let E=!1;if(s.placeholderData!==void 0&&L===void 0&&x==="pending"){let ue;u!=null&&u.isPlaceholderData&&s.placeholderData===(h==null?void 0:h.placeholderData)?(ue=u.data,E=!0):ue=typeof s.placeholderData=="function"?s.placeholderData((ie=R(this,js))==null?void 0:ie.state.data,R(this,js)):s.placeholderData,ue!==void 0&&(x="success",L=wc(u==null?void 0:u.data,ue,s),k=!0)}if(s.select&&L!==void 0&&!E)if(u&&L===(d==null?void 0:d.data)&&s.select===R(this,ni))L=R(this,Fs);else try{ee(this,ni,s.select),L=s.select(L),L=wc(u==null?void 0:u.data,L,s),ee(this,Fs,L),ee(this,dr,null)}catch(ue){ee(this,dr,ue)}R(this,dr)&&(M=R(this,dr),L=R(this,Fs),_=Date.now(),x="error");const I=v.fetchStatus==="fetching",A=x==="pending",O=x==="error",H=A&&I,$=L!==void 0,B={status:x,fetchStatus:v.fetchStatus,isPending:A,isSuccess:x==="success",isError:O,isInitialLoading:H,isLoading:H,data:L,dataUpdatedAt:v.dataUpdatedAt,error:M,errorUpdatedAt:_,failureCount:v.fetchFailureCount,failureReason:v.fetchFailureReason,errorUpdateCount:v.errorUpdateCount,isFetched:v.dataUpdateCount>0||v.errorUpdateCount>0,isFetchedAfterMount:v.dataUpdateCount>m.dataUpdateCount||v.errorUpdateCount>m.errorUpdateCount,isFetching:I,isRefetching:I&&!A,isLoadingError:O&&!$,isPaused:v.fetchStatus==="paused",isPlaceholderData:k,isRefetchError:O&&$,isStale:od(t,s),refetch:this.refetch,promise:R(this,In),isEnabled:Qt(s.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const ue=B.data!==void 0,Se=B.status==="error"&&!ue,Te=be=>{Se?be.reject(B.error):ue&&be.resolve(B.data)},xe=()=>{const be=ee(this,In,B.promise=xc());Te(be)},J=R(this,In);switch(J.status){case"pending":t.queryHash===o.queryHash&&Te(J);break;case"fulfilled":(Se||B.data!==J.value)&&xe();break;case"rejected":(!Se||B.error!==J.reason)&&xe();break}}return B}updateResult(){const t=R(this,Et),s=this.createResult(R(this,Pe),this.options);if(ee(this,Vr,R(this,Pe).state),ee(this,Is,this.options),R(this,Vr).data!==void 0&&ee(this,js,R(this,Pe)),yc(s,t))return;ee(this,Et,s);const o=()=>{if(!t)return!0;const{notifyOnChangeProps:a}=this.options,u=typeof a=="function"?a():a;if(u==="all"||!u&&!R(this,Ds).size)return!0;const d=new Set(u??R(this,Ds));return this.options.throwOnError&&d.add("error"),Object.keys(R(this,Et)).some(h=>{const p=h;return R(this,Et)[p]!==t[p]&&d.has(p)})};Ae(this,Fe,iy).call(this,{listeners:o()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ae(this,Fe,kc).call(this)}},At=new WeakMap,Pe=new WeakMap,ti=new WeakMap,Et=new WeakMap,Vr=new WeakMap,Is=new WeakMap,In=new WeakMap,dr=new WeakMap,ni=new WeakMap,Fs=new WeakMap,js=new WeakMap,Wr=new WeakMap,qr=new WeakMap,fr=new WeakMap,Ds=new WeakMap,Fe=new WeakSet,Bo=function(t){Ae(this,Fe,Tc).call(this);let s=R(this,Pe).fetch(this.options,t);return t!=null&&t.throwOnError||(s=s.catch(Pt)),s},Ec=function(){Ae(this,Fe,Cc).call(this);const t=yr(this.options.staleTime,R(this,Pe));if(Jr||R(this,Et).isStale||!gc(t))return;const o=Jg(R(this,Et).dataUpdatedAt,t)+1;ee(this,Wr,Dr.setTimeout(()=>{R(this,Et).isStale||this.updateResult()},o))},bc=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(R(this,Pe)):this.options.refetchInterval)??!1},_c=function(t){Ae(this,Fe,Rc).call(this),ee(this,fr,t),!(Jr||Qt(this.options.enabled,R(this,Pe))===!1||!gc(R(this,fr))||R(this,fr)===0)&&ee(this,qr,Dr.setInterval(()=>{(this.options.refetchIntervalInBackground||sd.isFocused())&&Ae(this,Fe,Bo).call(this)},R(this,fr)))},kc=function(){Ae(this,Fe,Ec).call(this),Ae(this,Fe,_c).call(this,Ae(this,Fe,bc).call(this))},Cc=function(){R(this,Wr)&&(Dr.clearTimeout(R(this,Wr)),ee(this,Wr,void 0))},Rc=function(){R(this,qr)&&(Dr.clearInterval(R(this,qr)),ee(this,qr,void 0))},Tc=function(){const t=R(this,At).getQueryCache().build(R(this,At),this.options);if(t===R(this,Pe))return;const s=R(this,Pe);ee(this,Pe,t),ee(this,ti,t.state),this.hasListeners()&&(s==null||s.removeObserver(this),t.addObserver(this))},iy=function(t){dt.batch(()=>{t.listeners&&this.listeners.forEach(s=>{s(R(this,Et))}),R(this,At).getQueryCache().notify({query:R(this,Pe),type:"observerResultsUpdated"})})},Km);function nS(n,t){return Qt(t.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&t.retryOnMount===!1)}function Hp(n,t){return nS(n,t)||n.state.data!==void 0&&Ac(n,t,t.refetchOnMount)}function Ac(n,t,s){if(Qt(t.enabled,n)!==!1&&yr(t.staleTime,n)!=="static"){const o=typeof s=="function"?s(n):s;return o==="always"||o!==!1&&od(n,t)}return!1}function Vp(n,t,s,o){return(n!==t||Qt(o.enabled,n)===!1)&&(!s.suspense||n.state.status!=="error")&&od(n,s)}function od(n,t){return Qt(t.enabled,n)!==!1&&n.isStaleByTime(yr(t.staleTime,n))}function rS(n,t){return!yc(n.getCurrentResult(),t)}function Wp(n){return{onFetch:(t,s)=>{var y,v,k,L,M;const o=t.options,a=(k=(v=(y=t.fetchOptions)==null?void 0:y.meta)==null?void 0:v.fetchMore)==null?void 0:k.direction,u=((L=t.state.data)==null?void 0:L.pages)||[],d=((M=t.state.data)==null?void 0:M.pageParams)||[];let h={pages:[],pageParams:[]},p=0;const m=async()=>{let _=!1;const x=A=>{K1(A,()=>t.signal,()=>_=!0)},E=ey(t.options,t.fetchOptions),I=async(A,O,H)=>{if(_)return Promise.reject();if(O==null&&A.pages.length)return Promise.resolve(A);const G=(()=>{const Se={client:t.client,queryKey:t.queryKey,pageParam:O,direction:H?"backward":"forward",meta:t.options.meta};return x(Se),Se})(),B=await E(G),{maxPages:ie}=t.options,ue=H?Q1:q1;return{pages:ue(A.pages,B,ie),pageParams:ue(A.pageParams,O,ie)}};if(a&&u.length){const A=a==="backward",O=A?sS:qp,H={pages:u,pageParams:d},$=O(o,H);h=await I(H,$,A)}else{const A=n??u.length;do{const O=p===0?d[0]??o.initialPageParam:qp(o,h);if(p>0&&O==null)break;h=await I(h,O),p++}while(p{var _,x;return(x=(_=t.options).persister)==null?void 0:x.call(_,m,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},s)}:t.fetchFn=m}}}function qp(n,{pages:t,pageParams:s}){const o=t.length-1;return t.length>0?n.getNextPageParam(t[o],t,s[o],s):void 0}function sS(n,{pages:t,pageParams:s}){var o;return t.length>0?(o=n.getPreviousPageParam)==null?void 0:o.call(n,t[0],t,s[0],s):void 0}var ri,gn,vt,Qr,yn,ar,Gm,oS=(Gm=class extends sy{constructor(t){super();pe(this,yn);pe(this,ri);pe(this,gn);pe(this,vt);pe(this,Qr);ee(this,ri,t.client),this.mutationId=t.mutationId,ee(this,vt,t.mutationCache),ee(this,gn,[]),this.state=t.state||iS(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){R(this,gn).includes(t)||(R(this,gn).push(t),this.clearGcTimeout(),R(this,vt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ee(this,gn,R(this,gn).filter(s=>s!==t)),this.scheduleGc(),R(this,vt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){R(this,gn).length||(this.state.status==="pending"?this.scheduleGc():R(this,vt).remove(this))}continue(){var t;return((t=R(this,Qr))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var d,h,p,m,y,v,k,L,M,_,x,E,I,A,O,H,$,G;const s=()=>{Ae(this,yn,ar).call(this,{type:"continue"})},o={client:R(this,ri),meta:this.options.meta,mutationKey:this.options.mutationKey};ee(this,Qr,ry({fn:()=>this.options.mutationFn?this.options.mutationFn(t,o):Promise.reject(new Error("No mutationFn found")),onFail:(B,ie)=>{Ae(this,yn,ar).call(this,{type:"failed",failureCount:B,error:ie})},onPause:()=>{Ae(this,yn,ar).call(this,{type:"pause"})},onContinue:s,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>R(this,vt).canRun(this)}));const a=this.state.status==="pending",u=!R(this,Qr).canStart();try{if(a)s();else{Ae(this,yn,ar).call(this,{type:"pending",variables:t,isPaused:u}),R(this,vt).config.onMutate&&await R(this,vt).config.onMutate(t,this,o);const ie=await((h=(d=this.options).onMutate)==null?void 0:h.call(d,t,o));ie!==this.state.context&&Ae(this,yn,ar).call(this,{type:"pending",context:ie,variables:t,isPaused:u})}const B=await R(this,Qr).start();return await((m=(p=R(this,vt).config).onSuccess)==null?void 0:m.call(p,B,t,this.state.context,this,o)),await((v=(y=this.options).onSuccess)==null?void 0:v.call(y,B,t,this.state.context,o)),await((L=(k=R(this,vt).config).onSettled)==null?void 0:L.call(k,B,null,this.state.variables,this.state.context,this,o)),await((_=(M=this.options).onSettled)==null?void 0:_.call(M,B,null,t,this.state.context,o)),Ae(this,yn,ar).call(this,{type:"success",data:B}),B}catch(B){try{await((E=(x=R(this,vt).config).onError)==null?void 0:E.call(x,B,t,this.state.context,this,o))}catch(ie){Promise.reject(ie)}try{await((A=(I=this.options).onError)==null?void 0:A.call(I,B,t,this.state.context,o))}catch(ie){Promise.reject(ie)}try{await((H=(O=R(this,vt).config).onSettled)==null?void 0:H.call(O,void 0,B,this.state.variables,this.state.context,this,o))}catch(ie){Promise.reject(ie)}try{await((G=($=this.options).onSettled)==null?void 0:G.call($,void 0,B,t,this.state.context,o))}catch(ie){Promise.reject(ie)}throw Ae(this,yn,ar).call(this,{type:"error",error:B}),B}finally{R(this,vt).runNext(this)}}},ri=new WeakMap,gn=new WeakMap,vt=new WeakMap,Qr=new WeakMap,yn=new WeakSet,ar=function(t){const s=o=>{switch(t.type){case"failed":return{...o,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...o,isPaused:!0};case"continue":return{...o,isPaused:!1};case"pending":return{...o,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...o,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...o,data:void 0,error:t.error,failureCount:o.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=s(this.state),dt.batch(()=>{R(this,gn).forEach(o=>{o.onMutationUpdate(t)}),R(this,vt).notify({mutation:this,type:"updated",action:t})})},Gm);function iS(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Fn,an,si,Xm,aS=(Xm=class extends ii{constructor(t={}){super();pe(this,Fn);pe(this,an);pe(this,si);this.config=t,ee(this,Fn,new Set),ee(this,an,new Map),ee(this,si,0)}build(t,s,o){const a=new oS({client:t,mutationCache:this,mutationId:++Sa(this,si)._,options:t.defaultMutationOptions(s),state:o});return this.add(a),a}add(t){R(this,Fn).add(t);const s=Ra(t);if(typeof s=="string"){const o=R(this,an).get(s);o?o.push(t):R(this,an).set(s,[t])}this.notify({type:"added",mutation:t})}remove(t){if(R(this,Fn).delete(t)){const s=Ra(t);if(typeof s=="string"){const o=R(this,an).get(s);if(o)if(o.length>1){const a=o.indexOf(t);a!==-1&&o.splice(a,1)}else o[0]===t&&R(this,an).delete(s)}}this.notify({type:"removed",mutation:t})}canRun(t){const s=Ra(t);if(typeof s=="string"){const o=R(this,an).get(s),a=o==null?void 0:o.find(u=>u.state.status==="pending");return!a||a===t}else return!0}runNext(t){var o;const s=Ra(t);if(typeof s=="string"){const a=(o=R(this,an).get(s))==null?void 0:o.find(u=>u!==t&&u.state.isPaused);return(a==null?void 0:a.continue())??Promise.resolve()}else return Promise.resolve()}clear(){dt.batch(()=>{R(this,Fn).forEach(t=>{this.notify({type:"removed",mutation:t})}),R(this,Fn).clear(),R(this,an).clear()})}getAll(){return Array.from(R(this,Fn))}find(t){const s={exact:!0,...t};return this.getAll().find(o=>Mp(s,o))}findAll(t={}){return this.getAll().filter(s=>Mp(t,s))}notify(t){dt.batch(()=>{this.listeners.forEach(s=>{s(t)})})}resumePausedMutations(){const t=this.getAll().filter(s=>s.state.isPaused);return dt.batch(()=>Promise.all(t.map(s=>s.continue().catch(Pt))))}},Fn=new WeakMap,an=new WeakMap,si=new WeakMap,Xm);function Ra(n){var t;return(t=n.options.scope)==null?void 0:t.id}var vn,Ym,lS=(Ym=class extends ii{constructor(t={}){super();pe(this,vn);this.config=t,ee(this,vn,new Map)}build(t,s,o){const a=s.queryKey,u=s.queryHash??nd(a,s);let d=this.get(u);return d||(d=new eS({client:t,queryKey:a,queryHash:u,options:t.defaultQueryOptions(s),state:o,defaultOptions:t.getQueryDefaults(a)}),this.add(d)),d}add(t){R(this,vn).has(t.queryHash)||(R(this,vn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const s=R(this,vn).get(t.queryHash);s&&(t.destroy(),s===t&&R(this,vn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){dt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return R(this,vn).get(t)}getAll(){return[...R(this,vn).values()]}find(t){const s={exact:!0,...t};return this.getAll().find(o=>Dp(s,o))}findAll(t={}){const s=this.getAll();return Object.keys(t).length>0?s.filter(o=>Dp(t,o)):s}notify(t){dt.batch(()=>{this.listeners.forEach(s=>{s(t)})})}onFocus(){dt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){dt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},vn=new WeakMap,Ym),We,hr,pr,Ms,Us,mr,zs,Bs,Jm,uS=(Jm=class{constructor(n={}){pe(this,We);pe(this,hr);pe(this,pr);pe(this,Ms);pe(this,Us);pe(this,mr);pe(this,zs);pe(this,Bs);ee(this,We,n.queryCache||new lS),ee(this,hr,n.mutationCache||new aS),ee(this,pr,n.defaultOptions||{}),ee(this,Ms,new Map),ee(this,Us,new Map),ee(this,mr,0)}mount(){Sa(this,mr)._++,R(this,mr)===1&&(ee(this,zs,sd.subscribe(async n=>{n&&(await this.resumePausedMutations(),R(this,We).onFocus())})),ee(this,Bs,$a.subscribe(async n=>{n&&(await this.resumePausedMutations(),R(this,We).onOnline())})))}unmount(){var n,t;Sa(this,mr)._--,R(this,mr)===0&&((n=R(this,zs))==null||n.call(this),ee(this,zs,void 0),(t=R(this,Bs))==null||t.call(this),ee(this,Bs,void 0))}isFetching(n){return R(this,We).findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return R(this,hr).findAll({...n,status:"pending"}).length}getQueryData(n){var s;const t=this.defaultQueryOptions({queryKey:n});return(s=R(this,We).get(t.queryHash))==null?void 0:s.state.data}ensureQueryData(n){const t=this.defaultQueryOptions(n),s=R(this,We).build(this,t),o=s.state.data;return o===void 0?this.fetchQuery(n):(n.revalidateIfStale&&s.isStaleByTime(yr(t.staleTime,s))&&this.prefetchQuery(t),Promise.resolve(o))}getQueriesData(n){return R(this,We).findAll(n).map(({queryKey:t,state:s})=>{const o=s.data;return[t,o]})}setQueryData(n,t,s){const o=this.defaultQueryOptions({queryKey:n}),a=R(this,We).get(o.queryHash),u=a==null?void 0:a.state.data,d=H1(t,u);if(d!==void 0)return R(this,We).build(this,o).setData(d,{...s,manual:!0})}setQueriesData(n,t,s){return dt.batch(()=>R(this,We).findAll(n).map(({queryKey:o})=>[o,this.setQueryData(o,t,s)]))}getQueryState(n){var s;const t=this.defaultQueryOptions({queryKey:n});return(s=R(this,We).get(t.queryHash))==null?void 0:s.state}removeQueries(n){const t=R(this,We);dt.batch(()=>{t.findAll(n).forEach(s=>{t.remove(s)})})}resetQueries(n,t){const s=R(this,We);return dt.batch(()=>(s.findAll(n).forEach(o=>{o.reset()}),this.refetchQueries({type:"active",...n},t)))}cancelQueries(n,t={}){const s={revert:!0,...t},o=dt.batch(()=>R(this,We).findAll(n).map(a=>a.cancel(s)));return Promise.all(o).then(Pt).catch(Pt)}invalidateQueries(n,t={}){return dt.batch(()=>(R(this,We).findAll(n).forEach(s=>{s.invalidate()}),(n==null?void 0:n.refetchType)==="none"?Promise.resolve():this.refetchQueries({...n,type:(n==null?void 0:n.refetchType)??(n==null?void 0:n.type)??"active"},t)))}refetchQueries(n,t={}){const s={...t,cancelRefetch:t.cancelRefetch??!0},o=dt.batch(()=>R(this,We).findAll(n).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let u=a.fetch(void 0,s);return s.throwOnError||(u=u.catch(Pt)),a.state.fetchStatus==="paused"?Promise.resolve():u}));return Promise.all(o).then(Pt)}fetchQuery(n){const t=this.defaultQueryOptions(n);t.retry===void 0&&(t.retry=!1);const s=R(this,We).build(this,t);return s.isStaleByTime(yr(t.staleTime,s))?s.fetch(t):Promise.resolve(s.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(Pt).catch(Pt)}fetchInfiniteQuery(n){return n.behavior=Wp(n.pages),this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(Pt).catch(Pt)}ensureInfiniteQueryData(n){return n.behavior=Wp(n.pages),this.ensureQueryData(n)}resumePausedMutations(){return $a.isOnline()?R(this,hr).resumePausedMutations():Promise.resolve()}getQueryCache(){return R(this,We)}getMutationCache(){return R(this,hr)}getDefaultOptions(){return R(this,pr)}setDefaultOptions(n){ee(this,pr,n)}setQueryDefaults(n,t){R(this,Ms).set(Go(n),{queryKey:n,defaultOptions:t})}getQueryDefaults(n){const t=[...R(this,Ms).values()],s={};return t.forEach(o=>{Xo(n,o.queryKey)&&Object.assign(s,o.defaultOptions)}),s}setMutationDefaults(n,t){R(this,Us).set(Go(n),{mutationKey:n,defaultOptions:t})}getMutationDefaults(n){const t=[...R(this,Us).values()],s={};return t.forEach(o=>{Xo(n,o.mutationKey)&&Object.assign(s,o.defaultOptions)}),s}defaultQueryOptions(n){if(n._defaulted)return n;const t={...R(this,pr).queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return t.queryHash||(t.queryHash=nd(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===rd&&(t.enabled=!1),t}defaultMutationOptions(n){return n!=null&&n._defaulted?n:{...R(this,pr).mutations,...(n==null?void 0:n.mutationKey)&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){R(this,We).clear(),R(this,hr).clear()}},We=new WeakMap,hr=new WeakMap,pr=new WeakMap,Ms=new WeakMap,Us=new WeakMap,mr=new WeakMap,zs=new WeakMap,Bs=new WeakMap,Jm),ay=b.createContext(void 0),cS=n=>{const t=b.useContext(ay);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},dS=({client:n,children:t})=>(b.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),w.jsx(ay.Provider,{value:n,children:t})),ly=b.createContext(!1),fS=()=>b.useContext(ly);ly.Provider;function hS(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}var pS=b.createContext(hS()),mS=()=>b.useContext(pS),gS=(n,t,s)=>{const o=s!=null&&s.state.error&&typeof n.throwOnError=="function"?ty(n.throwOnError,[s.state.error,s]):n.throwOnError;(n.suspense||n.experimental_prefetchInRender||o)&&(t.isReset()||(n.retryOnMount=!1))},yS=n=>{b.useEffect(()=>{n.clearReset()},[n])},vS=({result:n,errorResetBoundary:t,throwOnError:s,query:o,suspense:a})=>n.isError&&!t.isReset()&&!n.isFetching&&o&&(a&&n.data===void 0||ty(s,[n.error,o])),wS=n=>{if(n.suspense){const s=a=>a==="static"?a:Math.max(a??1e3,1e3),o=n.staleTime;n.staleTime=typeof o=="function"?(...a)=>s(o(...a)):s(o),typeof n.gcTime=="number"&&(n.gcTime=Math.max(n.gcTime,1e3))}},xS=(n,t)=>n.isLoading&&n.isFetching&&!t,SS=(n,t)=>(n==null?void 0:n.suspense)&&t.isPending,Qp=(n,t,s)=>t.fetchOptimistic(n).catch(()=>{s.clearReset()});function ES(n,t,s){var k,L,M,_;const o=fS(),a=mS(),u=cS(),d=u.defaultQueryOptions(n);(L=(k=u.getDefaultOptions().queries)==null?void 0:k._experimental_beforeQuery)==null||L.call(k,d);const h=u.getQueryCache().get(d.queryHash);d._optimisticResults=o?"isRestoring":"optimistic",wS(d),gS(d,a,h),yS(a);const p=!u.getQueryCache().get(d.queryHash),[m]=b.useState(()=>new t(u,d)),y=m.getOptimisticResult(d),v=!o&&n.subscribed!==!1;if(b.useSyncExternalStore(b.useCallback(x=>{const E=v?m.subscribe(dt.batchCalls(x)):Pt;return m.updateResult(),E},[m,v]),()=>m.getCurrentResult(),()=>m.getCurrentResult()),b.useEffect(()=>{m.setOptions(d)},[d,m]),SS(d,y))throw Qp(d,m,a);if(vS({result:y,errorResetBoundary:a,throwOnError:d.throwOnError,query:h,suspense:d.suspense}))throw y.error;if((_=(M=u.getDefaultOptions().queries)==null?void 0:M._experimental_afterQuery)==null||_.call(M,d,y),d.experimental_prefetchInRender&&!Jr&&xS(y,o)){const x=p?Qp(d,m,a):h==null?void 0:h.promise;x==null||x.catch(Pt).finally(()=>{m.updateResult()})}return d.notifyOnChangeProps?y:m.trackResult(y)}function bS(n,t){return ES(n,tS)}const _S=new uS({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}});/** * @remix-run/router v1.23.3 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function Yo(){return Yo=Object.assign?Object.assign.bind():function(n){for(var t=1;t"u")throw new Error(t)}function id(n,t){if(!n){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function CS(){return Math.random().toString(36).substr(2,8)}function Gp(n,t){return{usr:n.state,key:n.key,idx:t}}function Pc(n,t,s,o){return s===void 0&&(s=null),Yo({pathname:typeof n=="string"?n:n.pathname,search:"",hash:""},typeof t=="string"?Ws(t):t,{state:s,key:t&&t.key||o||CS()})}function Ha(n){let{pathname:t="/",search:s="",hash:o=""}=n;return s&&s!=="?"&&(t+=s.charAt(0)==="?"?s:"?"+s),o&&o!=="#"&&(t+=o.charAt(0)==="#"?o:"#"+o),t}function Ws(n){let t={};if(n){let s=n.indexOf("#");s>=0&&(t.hash=n.substr(s),n=n.substr(0,s));let o=n.indexOf("?");o>=0&&(t.search=n.substr(o),n=n.substr(0,o)),n&&(t.pathname=n)}return t}function RS(n,t,s,o){o===void 0&&(o={});let{window:a=document.defaultView,v5Compat:u=!1}=o,d=a.history,h=gr.Pop,p=null,m=y();m==null&&(m=0,d.replaceState(Yo({},d.state,{idx:m}),""));function y(){return(d.state||{idx:null}).idx}function v(){h=gr.Pop;let x=y(),E=x==null?null:x-m;m=x,p&&p({action:h,location:_.location,delta:E})}function k(x,E){h=gr.Push;let I=Pc(_.location,x,E);m=y()+1;let A=Gp(I,m),O=_.createHref(I);try{d.pushState(A,"",O)}catch(H){if(H instanceof DOMException&&H.name==="DataCloneError")throw H;a.location.assign(O)}u&&p&&p({action:h,location:_.location,delta:1})}function L(x,E){h=gr.Replace;let I=Pc(_.location,x,E);m=y();let A=Gp(I,m),O=_.createHref(I);d.replaceState(A,"",O),u&&p&&p({action:h,location:_.location,delta:0})}function M(x){let E=a.location.origin!=="null"?a.location.origin:a.location.href,I=typeof x=="string"?x:Ha(x);return I=I.replace(/ $/,"%20"),Ye(E,"No window.location.(origin|href) available to create URL for href: "+I),new URL(I,E)}let _={get action(){return h},get location(){return n(a,d)},listen(x){if(p)throw new Error("A history only accepts one active listener");return a.addEventListener(Kp,v),p=x,()=>{a.removeEventListener(Kp,v),p=null}},createHref(x){return t(a,x)},createURL:M,encodeLocation(x){let E=M(x);return{pathname:E.pathname,search:E.search,hash:E.hash}},push:k,replace:L,go(x){return d.go(x)}};return _}var Xp;(function(n){n.data="data",n.deferred="deferred",n.redirect="redirect",n.error="error"})(Xp||(Xp={}));function TS(n,t,s){return s===void 0&&(s="/"),AS(n,t,s)}function AS(n,t,s,o){let a=typeof t=="string"?Ws(t):t,u=ad(a.pathname||"/",s);if(u==null)return null;let d=uy(n);PS(d);let h=null,p=$S(u);for(let m=0;h==null&&m{let p={relativePath:h===void 0?u.path||"":h,caseSensitive:u.caseSensitive===!0,childrenIndex:d,route:u};p.relativePath.startsWith("/")&&(Ye(p.relativePath.startsWith(o),'Absolute route path "'+p.relativePath+'" nested under path '+('"'+o+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),p.relativePath=p.relativePath.slice(o.length));let m=vr([o,p.relativePath]),y=s.concat(p);u.children&&u.children.length>0&&(Ye(u.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+m+'".')),uy(u.children,t,y,m)),!(u.path==null&&!u.index)&&t.push({path:m,score:DS(m,u.index),routesMeta:y})};return n.forEach((u,d)=>{var h;if(u.path===""||!((h=u.path)!=null&&h.includes("?")))a(u,d);else for(let p of cy(u.path))a(u,d,p)}),t}function cy(n){let t=n.split("/");if(t.length===0)return[];let[s,...o]=t,a=s.endsWith("?"),u=s.replace(/\?$/,"");if(o.length===0)return a?[u,""]:[u];let d=cy(o.join("/")),h=[];return h.push(...d.map(p=>p===""?u:[u,p].join("/"))),a&&h.push(...d),h.map(p=>n.startsWith("/")&&p===""?"/":p)}function PS(n){n.sort((t,s)=>t.score!==s.score?s.score-t.score:MS(t.routesMeta.map(o=>o.childrenIndex),s.routesMeta.map(o=>o.childrenIndex)))}const NS=/^:[\w-]+$/,OS=3,LS=2,IS=1,FS=10,jS=-2,Yp=n=>n==="*";function DS(n,t){let s=n.split("/"),o=s.length;return s.some(Yp)&&(o+=jS),t&&(o+=LS),s.filter(a=>!Yp(a)).reduce((a,u)=>a+(NS.test(u)?OS:u===""?IS:FS),o)}function MS(n,t){return n.length===t.length&&n.slice(0,-1).every((o,a)=>o===t[a])?n[n.length-1]-t[t.length-1]:0}function US(n,t,s){let{routesMeta:o}=n,a={},u="/",d=[];for(let h=0;h{let{paramName:k,isOptional:L}=y;if(k==="*"){let _=h[v]||"";d=u.slice(0,u.length-_.length).replace(/(.)\/+$/,"$1")}const M=h[v];return L&&!M?m[k]=void 0:m[k]=(M||"").replace(/%2F/g,"/"),m},{}),pathname:u,pathnameBase:d,pattern:n}}function BS(n,t,s){t===void 0&&(t=!1),s===void 0&&(s=!0),id(n==="*"||!n.endsWith("*")||n.endsWith("/*"),'Route path "'+n+'" will be treated as if it were '+('"'+n.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+n.replace(/\*$/,"/*")+'".'));let o=[],a="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(d,h,p)=>(o.push({paramName:h,isOptional:p!=null}),p?"/?([^\\/]+)?":"/([^\\/]+)"));return n.endsWith("*")?(o.push({paramName:"*"}),a+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):s?a+="\\/*$":n!==""&&n!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),o]}function $S(n){try{return n.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return id(!1,'The URL path "'+n+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),n}}function ad(n,t){if(t==="/")return n;if(!n.toLowerCase().startsWith(t.toLowerCase()))return null;let s=t.endsWith("/")?t.length-1:t.length,o=n.charAt(s);return o&&o!=="/"?null:n.slice(s)||"/"}const HS=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,VS=n=>HS.test(n);function WS(n,t){t===void 0&&(t="/");let{pathname:s,search:o="",hash:a=""}=typeof n=="string"?Ws(n):n,u;if(s)if(VS(s))u=s;else{if(s.includes("//")){let d=s;s=hy(s),id(!1,"Pathnames cannot have embedded double slashes - normalizing "+(d+" -> "+s))}s.startsWith("/")?u=Jp(s.substring(1),"/"):u=Jp(s,t)}else u=t;return{pathname:u,search:KS(o),hash:GS(a)}}function Jp(n,t){let s=t.replace(/\/+$/,"").split("/");return n.split("/").forEach(a=>{a===".."?s.length>1&&s.pop():a!=="."&&s.push(a)}),s.length>1?s.join("/"):"/"}function Ju(n,t,s,o){return"Cannot include a '"+n+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(o)+"]. Please separate it out to the ")+("`to."+s+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function qS(n){return n.filter((t,s)=>s===0||t.route.path&&t.route.path.length>0)}function dy(n,t){let s=qS(n);return t?s.map((o,a)=>a===s.length-1?o.pathname:o.pathnameBase):s.map(o=>o.pathnameBase)}function fy(n,t,s,o){o===void 0&&(o=!1);let a;typeof n=="string"?a=Ws(n):(a=Yo({},n),Ye(!a.pathname||!a.pathname.includes("?"),Ju("?","pathname","search",a)),Ye(!a.pathname||!a.pathname.includes("#"),Ju("#","pathname","hash",a)),Ye(!a.search||!a.search.includes("#"),Ju("#","search","hash",a)));let u=n===""||a.pathname==="",d=u?"/":a.pathname,h;if(d==null)h=s;else{let v=t.length-1;if(!o&&d.startsWith("..")){let k=d.split("/");for(;k[0]==="..";)k.shift(),v-=1;a.pathname=k.join("/")}h=v>=0?t[v]:"/"}let p=WS(a,h),m=d&&d!=="/"&&d.endsWith("/"),y=(u||d===".")&&s.endsWith("/");return!p.pathname.endsWith("/")&&(m||y)&&(p.pathname+="/"),p}const hy=n=>n.replace(/\/\/+/g,"/"),vr=n=>hy(n.join("/")),QS=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),KS=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,GS=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n;function XS(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}const py=["post","put","patch","delete"];new Set(py);const YS=["get",...py];new Set(YS);/** * React Router v6.30.4 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function Jo(){return Jo=Object.assign?Object.assign.bind():function(n){for(var t=1;t{h.current=!0}),b.useCallback(function(m,y){if(y===void 0&&(y={}),!h.current)return;if(typeof m=="number"){o.go(m);return}let v=fy(m,JSON.parse(d),u,y.relative==="path");n==null&&t!=="/"&&(v.pathname=v.pathname==="/"?t:vr([t,v.pathname])),(y.replace?o.replace:o.push)(v,y.state,y)},[t,o,d,u,n])}function yy(n,t){let{relative:s}=t===void 0?{}:t,{future:o}=b.useContext(ns),{matches:a}=b.useContext(rs),{pathname:u}=qs(),d=JSON.stringify(dy(a,o.v7_relativeSplatPath));return b.useMemo(()=>fy(n,JSON.parse(d),u,s==="path"),[n,d,u,s])}function rE(n,t){return sE(n,t)}function sE(n,t,s,o){li()||Ye(!1);let{navigator:a}=b.useContext(ns),{matches:u}=b.useContext(rs),d=u[u.length-1],h=d?d.params:{};d&&d.pathname;let p=d?d.pathnameBase:"/";d&&d.route;let m=qs(),y;if(t){var v;let x=typeof t=="string"?Ws(t):t;p==="/"||(v=x.pathname)!=null&&v.startsWith(p)||Ye(!1),y=x}else y=m;let k=y.pathname||"/",L=k;if(p!=="/"){let x=p.replace(/^\//,"").split("/");L="/"+k.replace(/^\//,"").split("/").slice(x.length).join("/")}let M=TS(n,{pathname:L}),_=uE(M&&M.map(x=>Object.assign({},x,{params:Object.assign({},h,x.params),pathname:vr([p,a.encodeLocation?a.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?p:vr([p,a.encodeLocation?a.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),u,s,o);return t&&_?b.createElement(ai.Provider,{value:{location:Jo({pathname:"/",search:"",hash:"",state:null,key:"default"},y),navigationType:gr.Pop}},_):_}function oE(){let n=hE(),t=XS(n)?n.status+" "+n.statusText:n instanceof Error?n.message:JSON.stringify(n),s=n instanceof Error?n.stack:null,a={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return b.createElement(b.Fragment,null,b.createElement("h2",null,"Unexpected Application Error!"),b.createElement("h3",{style:{fontStyle:"italic"}},t),s?b.createElement("pre",{style:a},s):null,null)}const iE=b.createElement(oE,null);class aE extends b.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,s){return s.location!==t.location||s.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:s.error,location:s.location,revalidation:t.revalidation||s.revalidation}}componentDidCatch(t,s){console.error("React Router caught the following error during render",t,s)}render(){return this.state.error!==void 0?b.createElement(rs.Provider,{value:this.props.routeContext},b.createElement(my.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function lE(n){let{routeContext:t,match:s,children:o}=n,a=b.useContext(ld);return a&&a.static&&a.staticContext&&(s.route.errorElement||s.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=s.route.id),b.createElement(rs.Provider,{value:t},o)}function uE(n,t,s,o){var a;if(t===void 0&&(t=[]),s===void 0&&(s=null),o===void 0&&(o=null),n==null){var u;if(!s)return null;if(s.errors)n=s.matches;else if((u=o)!=null&&u.v7_partialHydration&&t.length===0&&!s.initialized&&s.matches.length>0)n=s.matches;else return null}let d=n,h=(a=s)==null?void 0:a.errors;if(h!=null){let y=d.findIndex(v=>v.route.id&&(h==null?void 0:h[v.route.id])!==void 0);y>=0||Ye(!1),d=d.slice(0,Math.min(d.length,y+1))}let p=!1,m=-1;if(s&&o&&o.v7_partialHydration)for(let y=0;y=0?d=d.slice(0,m+1):d=[d[0]];break}}}return d.reduceRight((y,v,k)=>{let L,M=!1,_=null,x=null;s&&(L=h&&v.route.id?h[v.route.id]:void 0,_=v.route.errorElement||iE,p&&(m<0&&k===0?(mE("route-fallback"),M=!0,x=null):m===k&&(M=!0,x=v.route.hydrateFallbackElement||null)));let E=t.concat(d.slice(0,k+1)),I=()=>{let A;return L?A=_:M?A=x:v.route.Component?A=b.createElement(v.route.Component,null):v.route.element?A=v.route.element:A=y,b.createElement(lE,{match:v,routeContext:{outlet:y,matches:E,isDataRoute:s!=null},children:A})};return s&&(v.route.ErrorBoundary||v.route.errorElement||k===0)?b.createElement(aE,{location:s.location,revalidation:s.revalidation,component:_,error:L,children:I(),routeContext:{outlet:null,matches:E,isDataRoute:!0}}):I()},null)}var vy=(function(n){return n.UseBlocker="useBlocker",n.UseRevalidator="useRevalidator",n.UseNavigateStable="useNavigate",n})(vy||{}),wy=(function(n){return n.UseBlocker="useBlocker",n.UseLoaderData="useLoaderData",n.UseActionData="useActionData",n.UseRouteError="useRouteError",n.UseNavigation="useNavigation",n.UseRouteLoaderData="useRouteLoaderData",n.UseMatches="useMatches",n.UseRevalidator="useRevalidator",n.UseNavigateStable="useNavigate",n.UseRouteId="useRouteId",n})(wy||{});function cE(n){let t=b.useContext(ld);return t||Ye(!1),t}function dE(n){let t=b.useContext(JS);return t||Ye(!1),t}function fE(n){let t=b.useContext(rs);return t||Ye(!1),t}function xy(n){let t=fE(),s=t.matches[t.matches.length-1];return s.route.id||Ye(!1),s.route.id}function hE(){var n;let t=b.useContext(my),s=dE(),o=xy();return t!==void 0?t:(n=s.errors)==null?void 0:n[o]}function pE(){let{router:n}=cE(vy.UseNavigateStable),t=xy(wy.UseNavigateStable),s=b.useRef(!1);return gy(()=>{s.current=!0}),b.useCallback(function(a,u){u===void 0&&(u={}),s.current&&(typeof a=="number"?n.navigate(a):n.navigate(a,Jo({fromRouteId:t},u)))},[n,t])}const Zp={};function mE(n,t,s){Zp[n]||(Zp[n]=!0)}function gE(n,t){n==null||n.v7_startTransition,n==null||n.v7_relativeSplatPath}function Nc(n){Ye(!1)}function yE(n){let{basename:t="/",children:s=null,location:o,navigationType:a=gr.Pop,navigator:u,static:d=!1,future:h}=n;li()&&Ye(!1);let p=t.replace(/^\/*/,"/"),m=b.useMemo(()=>({basename:p,navigator:u,static:d,future:Jo({v7_relativeSplatPath:!1},h)}),[p,h,u,d]);typeof o=="string"&&(o=Ws(o));let{pathname:y="/",search:v="",hash:k="",state:L=null,key:M="default"}=o,_=b.useMemo(()=>{let x=ad(y,p);return x==null?null:{location:{pathname:x,search:v,hash:k,state:L,key:M},navigationType:a}},[p,y,v,k,L,M,a]);return _==null?null:b.createElement(ns.Provider,{value:m},b.createElement(ai.Provider,{children:s,value:_}))}function vE(n){let{children:t,location:s}=n;return rE(Oc(t),s)}new Promise(()=>{});function Oc(n,t){t===void 0&&(t=[]);let s=[];return b.Children.forEach(n,(o,a)=>{if(!b.isValidElement(o))return;let u=[...t,a];if(o.type===b.Fragment){s.push.apply(s,Oc(o.props.children,u));return}o.type!==Nc&&Ye(!1),!o.props.index||!o.props.children||Ye(!1);let d={id:o.props.id||u.join("-"),caseSensitive:o.props.caseSensitive,element:o.props.element,Component:o.props.Component,index:o.props.index,path:o.props.path,loader:o.props.loader,action:o.props.action,errorElement:o.props.errorElement,ErrorBoundary:o.props.ErrorBoundary,hasErrorBoundary:o.props.ErrorBoundary!=null||o.props.errorElement!=null,shouldRevalidate:o.props.shouldRevalidate,handle:o.props.handle,lazy:o.props.lazy};o.props.children&&(d.children=Oc(o.props.children,u)),s.push(d)}),s}/** * React Router DOM v6.30.4 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function Lc(){return Lc=Object.assign?Object.assign.bind():function(n){for(var t=1;t{m&&em?em(()=>p(v)):p(v)},[p,m]);return b.useLayoutEffect(()=>d.listen(y),[d,y]),b.useEffect(()=>gE(o),[o]),b.createElement(yE,{basename:t,children:s,location:h.location,navigationType:h.action,navigator:d,future:o})}const CE=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",RE=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,wn=b.forwardRef(function(t,s){let{onClick:o,relative:a,reloadDocument:u,replace:d,state:h,target:p,to:m,preventScrollReset:y,viewTransition:v}=t,k=wE(t,EE),{basename:L}=b.useContext(ns),M,_=!1;if(typeof m=="string"&&RE.test(m)&&(M=m,CE))try{let A=new URL(window.location.href),O=m.startsWith("//")?new URL(A.protocol+m):new URL(m),H=ad(O.pathname,L);O.origin===A.origin&&H!=null?m=H+O.search+O.hash:_=!0}catch{}let x=ZS(m,{relative:a}),E=TE(m,{replace:d,state:h,target:p,preventScrollReset:y,relative:a,viewTransition:v});function I(A){o&&o(A),A.defaultPrevented||E(A)}return b.createElement("a",Lc({},k,{href:M||x,onClick:_||u?o:I,ref:s,target:p}))});var tm;(function(n){n.UseScrollRestoration="useScrollRestoration",n.UseSubmit="useSubmit",n.UseSubmitFetcher="useSubmitFetcher",n.UseFetcher="useFetcher",n.useViewTransitionState="useViewTransitionState"})(tm||(tm={}));var nm;(function(n){n.UseFetcher="useFetcher",n.UseFetchers="useFetchers",n.UseScrollRestoration="useScrollRestoration"})(nm||(nm={}));function TE(n,t){let{target:s,replace:o,state:a,preventScrollReset:u,relative:d,viewTransition:h}=t===void 0?{}:t,p=tE(),m=qs(),y=yy(n,{relative:d});return b.useCallback(v=>{if(SE(v,s)){v.preventDefault();let k=o!==void 0?o:Ha(m)===Ha(y);p(n,{replace:k,state:a,preventScrollReset:u,relative:d,viewTransition:h})}},[m,p,y,o,a,s,n,u,d,h])}function Sy(n,t){return function(){return n.apply(t,arguments)}}const{toString:AE}=Object.prototype,{getPrototypeOf:$s}=Object,{iterator:ui,toStringTag:Ey}=Symbol,Va=(({hasOwnProperty:n})=>(t,s)=>n.call(t,s))(Object.prototype),Zo=(n,t)=>{let s=n;const o=[];for(;s!=null&&s!==Object.prototype;){if(o.indexOf(s)!==-1)return!1;if(o.push(s),Va(s,t))return!0;s=$s(s)}return!1},PE=(n,t)=>n!=null&&Zo(n,t)?n[t]:void 0,ud=(n=>t=>{const s=AE.call(t);return n[s]||(n[s]=s.slice(8,-1).toLowerCase())})(Object.create(null)),cn=n=>(n=n.toLowerCase(),t=>ud(t)===n),Ka=n=>t=>typeof t===n,{isArray:Zr}=Array,Hs=Ka("undefined");function Qs(n){return n!==null&&!Hs(n)&&n.constructor!==null&&!Hs(n.constructor)&&Nt(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const by=cn("ArrayBuffer");function NE(n){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(n):t=n&&n.buffer&&by(n.buffer),t}const OE=Ka("string"),Nt=Ka("function"),_y=Ka("number"),Ks=n=>n!==null&&typeof n=="object",LE=n=>n===!0||n===!1,Ia=n=>{if(!Ks(n))return!1;const t=$s(n);return(t===null||t===Object.prototype||$s(t)===null)&&!Zo(n,Ey)&&!Zo(n,ui)},IE=n=>{if(!Ks(n)||Qs(n))return!1;try{return Object.keys(n).length===0&&Object.getPrototypeOf(n)===Object.prototype}catch{return!1}},FE=cn("Date"),jE=cn("File"),DE=n=>!!(n&&typeof n.uri<"u"),ME=n=>n&&typeof n.getParts<"u",UE=cn("Blob"),zE=cn("FileList"),BE=n=>Ks(n)&&Nt(n.pipe);function $E(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const rm=$E(),sm=typeof rm.FormData<"u"?rm.FormData:void 0,HE=n=>{if(!n)return!1;if(sm&&n instanceof sm)return!0;const t=$s(n);if(!t||t===Object.prototype||!Nt(n.append))return!1;const s=ud(n);return s==="formdata"||s==="object"&&Nt(n.toString)&&n.toString()==="[object FormData]"},VE=cn("URLSearchParams"),[WE,qE,QE,KE]=["ReadableStream","Request","Response","Headers"].map(cn),GE=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ci(n,t,{allOwnKeys:s=!1}={}){if(n===null||typeof n>"u")return;let o,a;if(typeof n!="object"&&(n=[n]),Zr(n))for(o=0,a=n.length;o0;)if(a=s[o],t===a.toLowerCase())return a;return null}const Mr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Cy=n=>!Hs(n)&&n!==Mr;function Ic(...n){const{caseless:t,skipUndefined:s}=Cy(this)&&this||{},o={},a=(u,d)=>{if(d==="__proto__"||d==="constructor"||d==="prototype")return;const h=t&&typeof d=="string"&&ky(o,d)||d,p=Va(o,h)?o[h]:void 0;Ia(p)&&Ia(u)?o[h]=Ic(p,u):Ia(u)?o[h]=Ic({},u):Zr(u)?o[h]=u.slice():(!s||!Hs(u))&&(o[h]=u)};for(let u=0,d=n.length;u(ci(t,(a,u)=>{s&&Nt(a)?Object.defineProperty(n,u,{__proto__:null,value:Sy(a,s),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(n,u,{__proto__:null,value:a,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:o}),n),YE=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),JE=(n,t,s,o)=>{n.prototype=Object.create(t.prototype,o),Object.defineProperty(n.prototype,"constructor",{__proto__:null,value:n,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(n,"super",{__proto__:null,value:t.prototype}),s&&Object.assign(n.prototype,s)},ZE=(n,t,s,o)=>{let a,u,d;const h={};if(t=t||{},n==null)return t;do{for(a=Object.getOwnPropertyNames(n),u=a.length;u-- >0;)d=a[u],(!o||o(d,n,t))&&!h[d]&&(t[d]=n[d],h[d]=!0);n=s!==!1&&$s(n)}while(n&&(!s||s(n,t))&&n!==Object.prototype);return t},eb=(n,t,s)=>{n=String(n),(s===void 0||s>n.length)&&(s=n.length),s-=t.length;const o=n.indexOf(t,s);return o!==-1&&o===s},tb=n=>{if(!n)return null;if(Zr(n))return n;let t=n.length;if(!_y(t))return null;const s=new Array(t);for(;t-- >0;)s[t]=n[t];return s},nb=(n=>t=>n&&t instanceof n)(typeof Uint8Array<"u"&&$s(Uint8Array)),rb=(n,t)=>{const o=(n&&n[ui]).call(n);let a;for(;(a=o.next())&&!a.done;){const u=a.value;t.call(n,u[0],u[1])}},sb=(n,t)=>{let s;const o=[];for(;(s=n.exec(t))!==null;)o.push(s);return o},ob=cn("HTMLFormElement"),ib=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(s,o,a){return o.toUpperCase()+a}),{propertyIsEnumerable:ab}=Object.prototype,lb=cn("RegExp"),Ry=(n,t)=>{const s=Object.getOwnPropertyDescriptors(n),o={};ci(s,(a,u)=>{let d;(d=t(a,u,n))!==!1&&(o[u]=d||a)}),Object.defineProperties(n,o)},ub=n=>{Ry(n,(t,s)=>{if(Nt(n)&&["arguments","caller","callee"].includes(s))return!1;const o=n[s];if(Nt(o)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+s+"'")})}})},cb=(n,t)=>{const s={},o=a=>{a.forEach(u=>{s[u]=!0})};return Zr(n)?o(n):o(String(n).split(t)),s},db=()=>{},fb=(n,t)=>n!=null&&Number.isFinite(n=+n)?n:t;function hb(n){return!!(n&&Nt(n.append)&&n[Ey]==="FormData"&&n[ui])}const pb=n=>{const t=new WeakSet,s=o=>{if(Ks(o)){if(t.has(o))return;if(Qs(o))return o;if(!("toJSON"in o)){t.add(o);const a=Zr(o)?[]:{};return ci(o,(u,d)=>{const h=s(u);!Hs(h)&&(a[d]=h)}),t.delete(o),a}}return o};return s(n)},mb=cn("AsyncFunction"),gb=n=>n&&(Ks(n)||Nt(n))&&Nt(n.then)&&Nt(n.catch),Ty=((n,t)=>n?setImmediate:t?((s,o)=>(Mr.addEventListener("message",({source:a,data:u})=>{a===Mr&&u===s&&o.length&&o.shift()()},!1),a=>{o.push(a),Mr.postMessage(s,"*")}))(`axios@${Math.random()}`,[]):s=>setTimeout(s))(typeof setImmediate=="function",Nt(Mr.postMessage)),yb=typeof queueMicrotask<"u"?queueMicrotask.bind(Mr):typeof process<"u"&&process.nextTick||Ty,Ay=n=>n!=null&&Nt(n[ui]),vb=n=>n!=null&&Zo(n,ui)&&Ay(n),N={isArray:Zr,isArrayBuffer:by,isBuffer:Qs,isFormData:HE,isArrayBufferView:NE,isString:OE,isNumber:_y,isBoolean:LE,isObject:Ks,isPlainObject:Ia,isEmptyObject:IE,isReadableStream:WE,isRequest:qE,isResponse:QE,isHeaders:KE,isUndefined:Hs,isDate:FE,isFile:jE,isReactNativeBlob:DE,isReactNative:ME,isBlob:UE,isRegExp:lb,isFunction:Nt,isStream:BE,isURLSearchParams:VE,isTypedArray:nb,isFileList:zE,forEach:ci,merge:Ic,extend:XE,trim:GE,stripBOM:YE,inherits:JE,toFlatObject:ZE,kindOf:ud,kindOfTest:cn,endsWith:eb,toArray:tb,forEachEntry:rb,matchAll:sb,isHTMLForm:ob,hasOwnProperty:Va,hasOwnProp:Va,hasOwnInPrototypeChain:Zo,getSafeProp:PE,reduceDescriptors:Ry,freezeMethods:ub,toObjectSet:cb,toCamelCase:ib,noop:db,toFiniteNumber:fb,findKey:ky,global:Mr,isContextDefined:Cy,isSpecCompliantForm:hb,toJSONObject:pb,isAsyncFn:mb,isThenable:gb,setImmediate:Ty,asap:yb,isIterable:Ay,isSafeIterable:vb},wb=N.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),xb=n=>{const t={};let s,o,a;return n&&n.split(` `).forEach(function(d){a=d.indexOf(":"),s=d.substring(0,a).trim().toLowerCase(),o=d.substring(a+1).trim(),!(!s||t[s]&&wb[s])&&(s==="set-cookie"?t[s]?t[s].push(o):t[s]=[o]:t[s]=t[s]?t[s]+", "+o:o)}),t};function Sb(n){let t=0,s=n.length;for(;tt;){const o=n.charCodeAt(s-1);if(o!==9&&o!==32)break;s-=1}return t===0&&s===n.length?n:n.slice(t,s)}const Eb=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),bb=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function cd(n,t){return N.isArray(n)?n.map(s=>cd(s,t)):Sb(String(n).replace(t,""))}const _b=n=>cd(n,Eb),kb=n=>cd(n,bb);function Py(n){const t=Object.create(null);return N.forEach(n.toJSON(),(s,o)=>{t[o]=kb(s)}),t}const om=Symbol("internals");function Do(n){return n&&String(n).trim().toLowerCase()}function Fa(n){return n===!1||n==null?n:N.isArray(n)?n.map(Fa):_b(String(n))}function Cb(n){const t=Object.create(null),s=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let o;for(;o=s.exec(n);)t[o[1]]=o[2];return t}const Rb=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function Zu(n,t,s,o,a){if(N.isFunction(o))return o.call(this,t,s);if(a&&(t=s),!!N.isString(t)){if(N.isString(o))return t.indexOf(o)!==-1;if(N.isRegExp(o))return o.test(t)}}function Tb(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,s,o)=>s.toUpperCase()+o)}function Ab(n,t){const s=N.toCamelCase(" "+t);["get","set","has"].forEach(o=>{Object.defineProperty(n,o+s,{__proto__:null,value:function(a,u,d){return this[o].call(this,t,a,u,d)},configurable:!0})})}let wt=class{constructor(t){t&&this.set(t)}set(t,s,o){const a=this;function u(h,p,m){const y=Do(p);if(!y)return;const v=N.findKey(a,y);(!v||a[v]===void 0||m===!0||m===void 0&&a[v]!==!1)&&(a[v||p]=Fa(h))}const d=(h,p)=>N.forEach(h,(m,y)=>u(m,y,p));if(N.isPlainObject(t)||t instanceof this.constructor)d(t,s);else if(N.isString(t)&&(t=t.trim())&&!Rb(t))d(xb(t),s);else if(N.isObject(t)&&N.isSafeIterable(t)){let h=Object.create(null),p,m;for(const y of t){if(!N.isArray(y))throw new TypeError("Object iterator must return a key-value pair");m=y[0],N.hasOwnProp(h,m)?(p=h[m],h[m]=N.isArray(p)?[...p,y[1]]:[p,y[1]]):h[m]=y[1]}d(h,s)}else t!=null&&u(s,t,o);return this}get(t,s){if(t=Do(t),t){const o=N.findKey(this,t);if(o){const a=this[o];if(!s)return a;if(s===!0)return Cb(a);if(N.isFunction(s))return s.call(this,a,o);if(N.isRegExp(s))return s.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,s){if(t=Do(t),t){const o=N.findKey(this,t);return!!(o&&this[o]!==void 0&&(!s||Zu(this,this[o],o,s)))}return!1}delete(t,s){const o=this;let a=!1;function u(d){if(d=Do(d),d){const h=N.findKey(o,d);h&&(!s||Zu(o,o[h],h,s))&&(delete o[h],a=!0)}}return N.isArray(t)?t.forEach(u):u(t),a}clear(t){const s=Object.keys(this);let o=s.length,a=!1;for(;o--;){const u=s[o];(!t||Zu(this,this[u],u,t,!0))&&(delete this[u],a=!0)}return a}normalize(t){const s=this,o={};return N.forEach(this,(a,u)=>{const d=N.findKey(o,u);if(d){s[d]=Fa(a),delete s[u];return}const h=t?Tb(u):String(u).trim();h!==u&&delete s[u],s[h]=Fa(a),o[h]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const s=Object.create(null);return N.forEach(this,(o,a)=>{o!=null&&o!==!1&&(s[a]=t&&N.isArray(o)?o.join(", "):o)}),s}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,s])=>t+": "+s).join(` `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...s){const o=new this(t);return s.forEach(a=>o.set(a)),o}static accessor(t){const o=(this[om]=this[om]={accessors:{}}).accessors,a=this.prototype;function u(d){const h=Do(d);o[h]||(Ab(a,d),o[h]=!0)}return N.isArray(t)?t.forEach(u):u(t),this}};wt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);N.reduceDescriptors(wt.prototype,({value:n},t)=>{let s=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(o){this[s]=o}}});N.freezeMethods(wt);const Pb="[REDACTED ****]";function Nb(n){if(N.hasOwnProp(n,"toJSON"))return!0;let t=Object.getPrototypeOf(n);for(;t&&t!==Object.prototype;){if(N.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function Ob(n,t){const s=new Set(t.map(u=>String(u).toLowerCase())),o=[],a=u=>{if(u===null||typeof u!="object"||N.isBuffer(u))return u;if(o.indexOf(u)!==-1)return;u instanceof wt&&(u=u.toJSON()),o.push(u);let d;if(N.isArray(u))d=[],u.forEach((h,p)=>{const m=a(h);N.isUndefined(m)||(d[p]=m)});else{if(!N.isPlainObject(u)&&Nb(u))return o.pop(),u;d=Object.create(null);for(const[h,p]of Object.entries(u)){const m=s.has(h.toLowerCase())?Pb:a(p);N.isUndefined(m)||(d[h]=m)}}return o.pop(),d};return a(n)}let Y=class Ny extends Error{static from(t,s,o,a,u,d){const h=new Ny(t.message,s||t.code,o,a,u);return Object.defineProperty(h,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),h.name=t.name,t.status!=null&&h.status==null&&(h.status=t.status),d&&Object.assign(h,d),h}constructor(t,s,o,a,u){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,s&&(this.code=s),o&&(this.config=o),a&&(this.request=a),u&&(this.response=u,this.status=u.status)}toJSON(){const t=this.config,s=t&&N.hasOwnProp(t,"redact")?t.redact:void 0,o=N.isArray(s)&&s.length>0?Ob(t,s):N.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:o,code:this.code,status:this.status}}};Y.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";Y.ERR_BAD_OPTION="ERR_BAD_OPTION";Y.ECONNABORTED="ECONNABORTED";Y.ETIMEDOUT="ETIMEDOUT";Y.ECONNREFUSED="ECONNREFUSED";Y.ERR_NETWORK="ERR_NETWORK";Y.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";Y.ERR_DEPRECATED="ERR_DEPRECATED";Y.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";Y.ERR_BAD_REQUEST="ERR_BAD_REQUEST";Y.ERR_CANCELED="ERR_CANCELED";Y.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";Y.ERR_INVALID_URL="ERR_INVALID_URL";Y.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const Lb=null,Oy=100;function Fc(n){return N.isPlainObject(n)||N.isArray(n)}function Ly(n){return N.endsWith(n,"[]")?n.slice(0,-2):n}function ec(n,t,s){return n?n.concat(t).map(function(a,u){return a=Ly(a),!s&&u?"["+a+"]":a}).join(s?".":""):t}function Ib(n){return N.isArray(n)&&!n.some(Fc)}const Fb=N.toFlatObject(N,{},null,function(t){return/^is[A-Z]/.test(t)});function Ga(n,t,s){if(!N.isObject(n))throw new TypeError("target must be an object");t=t||new FormData,s=N.toFlatObject(s,{metaTokens:!0,dots:!1,indexes:!1},!1,function(I,A){return!N.isUndefined(A[I])});const o=s.metaTokens,a=s.visitor||M,u=s.dots,d=s.indexes,h=s.Blob||typeof Blob<"u"&&Blob,p=s.maxDepth===void 0?Oy:s.maxDepth,m=h&&N.isSpecCompliantForm(t),y=[];if(!N.isFunction(a))throw new TypeError("visitor must be a function");function v(E){if(E===null)return"";if(N.isDate(E))return E.toISOString();if(N.isBoolean(E))return E.toString();if(!m&&N.isBlob(E))throw new Y("Blob is not supported. Use a Buffer instead.");if(N.isArrayBuffer(E)||N.isTypedArray(E)){if(m&&typeof h=="function")return new h([E]);if(typeof Buffer<"u")return Buffer.from(E);throw new Y("Blob is not supported. Use a Buffer instead.",Y.ERR_NOT_SUPPORT)}return E}function k(E){if(E>p)throw new Y("Object is too deeply nested ("+E+" levels). Max depth: "+p,Y.ERR_FORM_DATA_DEPTH_EXCEEDED)}function L(E,I){if(p===1/0)return JSON.stringify(E);const A=[];return JSON.stringify(E,function(H,$){if(!N.isObject($))return $;for(;A.length&&A[A.length-1]!==this;)A.pop();return A.push($),k(I+A.length-1),$})}function M(E,I,A){let O=E;if(N.isReactNative(t)&&N.isReactNativeBlob(E))return t.append(ec(A,I,u),v(E)),!1;if(E&&!A&&typeof E=="object"){if(N.endsWith(I,"{}"))I=o?I:I.slice(0,-2),E=L(E,1);else if(N.isArray(E)&&Ib(E)||(N.isFileList(E)||N.endsWith(I,"[]"))&&(O=N.toArray(E)))return I=Ly(I),O.forEach(function($,G){!(N.isUndefined($)||$===null)&&t.append(d===!0?ec([I],G,u):d===null?I:I+"[]",v($))}),!1}return Fc(E)?!0:(t.append(ec(A,I,u),v(E)),!1)}const _=Object.assign(Fb,{defaultVisitor:M,convertValue:v,isVisitable:Fc});function x(E,I,A=0){if(!N.isUndefined(E)){if(k(A),y.indexOf(E)!==-1)throw new Error("Circular reference detected in "+I.join("."));y.push(E),N.forEach(E,function(H,$){(!(N.isUndefined(H)||H===null)&&a.call(t,H,N.isString($)?$.trim():$,I,_))===!0&&x(H,I?I.concat($):[$],A+1)}),y.pop()}}if(!N.isObject(n))throw new TypeError("data must be an object");return x(n),t}function im(n){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(n).replace(/[!'()~]|%20/g,function(o){return t[o]})}function dd(n,t){this._pairs=[],n&&Ga(n,this,t)}const Iy=dd.prototype;Iy.append=function(t,s){this._pairs.push([t,s])};Iy.toString=function(t){const s=t?o=>t.call(this,o,im):im;return this._pairs.map(function(a){return s(a[0])+"="+s(a[1])},"").join("&")};function jb(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Fy(n,t,s){if(!t)return n;n=n||"";const o=N.isFunction(s)?{serialize:s}:s,a=N.getSafeProp(o,"encode")||jb,u=N.getSafeProp(o,"serialize");let d;if(u?d=u(t,o):d=N.isURLSearchParams(t)?t.toString():new dd(t,o).toString(a),d){const h=n.indexOf("#");h!==-1&&(n=n.slice(0,h)),n+=(n.indexOf("?")===-1?"?":"&")+d}return n}class am{constructor(){this.handlers=[]}use(t,s,o){return this.handlers.push({fulfilled:t,rejected:s,synchronous:o?o.synchronous:!1,runWhen:o?o.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){N.forEach(this.handlers,function(o){o!==null&&t(o)})}}const fd={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},Db=typeof URLSearchParams<"u"?URLSearchParams:dd,Mb=typeof FormData<"u"?FormData:null,Ub=typeof Blob<"u"?Blob:null,zb={isBrowser:!0,classes:{URLSearchParams:Db,FormData:Mb,Blob:Ub},protocols:["http","https","file","blob","url","data"]},hd=typeof window<"u"&&typeof document<"u",jc=typeof navigator=="object"&&navigator||void 0,Bb=hd&&(!jc||["ReactNative","NativeScript","NS"].indexOf(jc.product)<0),$b=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Hb=hd&&window.location.href||"http://localhost",Vb=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:hd,hasStandardBrowserEnv:Bb,hasStandardBrowserWebWorkerEnv:$b,navigator:jc,origin:Hb},Symbol.toStringTag,{value:"Module"})),ft={...Vb,...zb};function Wb(n,t){return Ga(n,new ft.classes.URLSearchParams,{visitor:function(s,o,a,u){return ft.isNode&&N.isBuffer(s)?(this.append(o,s.toString("base64")),!1):u.defaultVisitor.apply(this,arguments)},...t})}const lm=Oy;function jy(n){if(n>lm)throw new Y("FormData field is too deeply nested ("+n+" levels). Max depth: "+lm,Y.ERR_FORM_DATA_DEPTH_EXCEEDED)}function qb(n){const t=[],s=/\w+|\[(\w*)]/g;let o;for(;(o=s.exec(n))!==null;)jy(t.length),t.push(o[0]==="[]"?"":o[1]||o[0]);return t}function Qb(n){const t={},s=Object.keys(n);let o;const a=s.length;let u;for(o=0;o=s.length;return d=!d&&N.isArray(a)?a.length:d,p?(N.hasOwnProp(a,d)?a[d]=N.isArray(a[d])?a[d].concat(o):[a[d],o]:a[d]=o,!h):((!N.hasOwnProp(a,d)||!N.isObject(a[d]))&&(a[d]=[]),t(s,o,a[d],u)&&N.isArray(a[d])&&(a[d]=Qb(a[d])),!h)}if(N.isFormData(n)&&N.isFunction(n.entries)){const s={};return N.forEachEntry(n,(o,a)=>{t(qb(o),a,s,0)}),s}return null}const Ts=(n,t)=>n!=null&&N.hasOwnProp(n,t)?n[t]:void 0;function Kb(n,t,s){if(N.isString(n))try{return(t||JSON.parse)(n),N.trim(n)}catch(o){if(o.name!=="SyntaxError")throw o}return(s||JSON.stringify)(n)}const di={transitional:fd,adapter:["xhr","http","fetch"],transformRequest:[function(t,s){const o=s.getContentType()||"",a=o.indexOf("application/json")>-1,u=N.isObject(t);if(u&&N.isHTMLForm(t)&&(t=new FormData(t)),N.isFormData(t))return a?JSON.stringify(Dy(t)):t;if(N.isArrayBuffer(t)||N.isBuffer(t)||N.isStream(t)||N.isFile(t)||N.isBlob(t)||N.isReadableStream(t))return t;if(N.isArrayBufferView(t))return t.buffer;if(N.isURLSearchParams(t))return s.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let h;if(u){const p=Ts(this,"formSerializer");if(o.indexOf("application/x-www-form-urlencoded")>-1)return Wb(t,p).toString();if((h=N.isFileList(t))||o.indexOf("multipart/form-data")>-1){const m=Ts(this,"env"),y=m&&m.FormData;return Ga(h?{"files[]":t}:t,y&&new y,p)}}return u||a?(s.setContentType("application/json",!1),Kb(t)):t}],transformResponse:[function(t){const s=Ts(this,"transitional")||di.transitional,o=s&&s.forcedJSONParsing,a=Ts(this,"responseType"),u=a==="json";if(N.isResponse(t)||N.isReadableStream(t))return t;if(t&&N.isString(t)&&(o&&!a||u)){const h=!(s&&s.silentJSONParsing)&&u;try{return JSON.parse(t,Ts(this,"parseReviver"))}catch(p){if(h)throw p.name==="SyntaxError"?Y.from(p,Y.ERR_BAD_RESPONSE,this,null,Ts(this,"response")):p}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ft.classes.FormData,Blob:ft.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};N.forEach(["delete","get","head","post","put","patch","query"],n=>{di.headers[n]={}});function tc(n,t){const s=this||di,o=t||s,a=wt.from(o.headers);let u=o.data;return N.forEach(n,function(h){u=h.call(s,u,a.normalize(),t?t.status:void 0)}),a.normalize(),u}function My(n){return!!(n&&n.__CANCEL__)}let fi=class extends Y{constructor(t,s,o){super(t??"canceled",Y.ERR_CANCELED,s,o),this.name="CanceledError",this.__CANCEL__=!0}};function Uy(n,t,s){const o=s.config.validateStatus;!s.status||!o||o(s.status)?n(s):t(new Y("Request failed with status code "+s.status,s.status>=400&&s.status<500?Y.ERR_BAD_REQUEST:Y.ERR_BAD_RESPONSE,s.config,s.request,s))}function Gb(n){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(n);return t&&t[1]||""}function Xb(n,t){n=n||10;const s=new Array(n),o=new Array(n);let a=0,u=0,d;return t=t!==void 0?t:1e3,function(p){const m=Date.now(),y=o[u];d||(d=m),s[a]=p,o[a]=m;let v=u,k=0;for(;v!==a;)k+=s[v++],v=v%n;if(a=(a+1)%n,a===u&&(u=(u+1)%n),m-d{s=y,a=null,u&&(clearTimeout(u),u=null),n(...m)};return[(...m)=>{const y=Date.now(),v=y-s;v>=o?d(m,y):(a=m,u||(u=setTimeout(()=>{u=null,d(a)},o-v)))},()=>a&&d(a)]}const Wa=(n,t,s=3)=>{let o=0;const a=Xb(50,250);return Yb(u=>{if(!u||typeof u.loaded!="number")return;const d=u.loaded,h=u.lengthComputable?u.total:void 0,p=h!=null?Math.min(d,h):d,m=Math.max(0,p-o),y=a(m);o=Math.max(o,p);const v={loaded:p,total:h,progress:h?p/h:void 0,bytes:m,rate:y||void 0,estimated:y&&h?(h-p)/y:void 0,event:u,lengthComputable:h!=null,[t?"download":"upload"]:!0};n(v)},s)},um=(n,t)=>{const s=n!=null;return[o=>t[0]({lengthComputable:s,total:n,loaded:o}),t[1]]},cm=n=>(...t)=>N.asap(()=>n(...t)),Jb=ft.hasStandardBrowserEnv?((n,t)=>s=>(s=new URL(s,ft.origin),n.protocol===s.protocol&&n.host===s.host&&(t||n.port===s.port)))(new URL(ft.origin),ft.navigator&&/(msie|trident)/i.test(ft.navigator.userAgent)):()=>!0,Zb=ft.hasStandardBrowserEnv?{write(n,t,s,o,a,u,d){if(typeof document>"u")return;const h=[`${n}=${encodeURIComponent(t)}`];N.isNumber(s)&&h.push(`expires=${new Date(s).toUTCString()}`),N.isString(o)&&h.push(`path=${o}`),N.isString(a)&&h.push(`domain=${a}`),u===!0&&h.push("secure"),N.isString(d)&&h.push(`SameSite=${d}`),document.cookie=h.join("; ")},read(n){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let s=0;sn instanceof wt?{...n}:n;function es(n,t){n=n||{},t=t||{};const s=Object.create(null);Object.defineProperty(s,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function o(y,v,k,L){return N.isPlainObject(y)&&N.isPlainObject(v)?N.merge.call({caseless:L},y,v):N.isPlainObject(v)?N.merge({},v):N.isArray(v)?v.slice():v}function a(y,v,k,L){if(N.isUndefined(v)){if(!N.isUndefined(y))return o(void 0,y,k,L)}else return o(y,v,k,L)}function u(y,v){if(!N.isUndefined(v))return o(void 0,v)}function d(y,v){if(N.isUndefined(v)){if(!N.isUndefined(y))return o(void 0,y)}else return o(void 0,v)}function h(y){const v=N.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!N.isUndefined(v))if(N.isPlainObject(v)){if(N.hasOwnProp(v,y))return v[y]}else return;const k=N.hasOwnProp(n,"transitional")?n.transitional:void 0;if(N.isPlainObject(k)&&N.hasOwnProp(k,y))return k[y]}function p(y,v,k){if(N.hasOwnProp(t,k))return o(y,v);if(N.hasOwnProp(n,k))return o(void 0,y)}const m={url:u,method:u,data:u,baseURL:d,transformRequest:d,transformResponse:d,paramsSerializer:d,timeout:d,timeoutMessage:d,withCredentials:d,withXSRFToken:d,adapter:d,responseType:d,xsrfCookieName:d,xsrfHeaderName:d,onUploadProgress:d,onDownloadProgress:d,decompress:d,maxContentLength:d,maxBodyLength:d,beforeRedirect:d,transport:d,httpAgent:d,httpsAgent:d,cancelToken:d,socketPath:d,allowedSocketPaths:d,responseEncoding:d,validateStatus:p,headers:(y,v,k)=>a(fm(y),fm(v),k,!0)};return N.forEach(Object.keys({...n,...t}),function(v){if(v==="__proto__"||v==="constructor"||v==="prototype")return;const k=N.hasOwnProp(m,v)?m[v]:a,L=N.hasOwnProp(n,v)?n[v]:void 0,M=N.hasOwnProp(t,v)?t[v]:void 0,_=k(L,M,v);N.isUndefined(_)&&k!==p||(s[v]=_)}),N.hasOwnProp(t,"validateStatus")&&N.isUndefined(t.validateStatus)&&h("validateStatusUndefinedResolves")===!1&&(N.hasOwnProp(n,"validateStatus")?s.validateStatus=o(void 0,n.validateStatus):delete s.validateStatus),s}const i_=["content-type","content-length"];function a_(n,t,s){if(s!=="content-only"){n.set(t);return}Object.entries(t||{}).forEach(([o,a])=>{i_.includes(o.toLowerCase())&&n.set(o,a)})}const l_=n=>encodeURIComponent(n).replace(/%([0-9A-F]{2})/gi,(t,s)=>String.fromCharCode(parseInt(s,16)));function By(n){const t=es({},n),s=k=>N.hasOwnProp(t,k)?t[k]:void 0,o=s("data");let a=s("withXSRFToken");const u=s("xsrfHeaderName"),d=s("xsrfCookieName");let h=s("headers");const p=s("auth"),m=s("baseURL"),y=s("allowAbsoluteUrls"),v=s("url");if(t.headers=h=wt.from(h),t.url=Fy(zy(m,v,y,t),s("params"),s("paramsSerializer")),p){const k=N.getSafeProp(p,"username")||"",L=N.getSafeProp(p,"password")||"";try{h.set("Authorization","Basic "+btoa(k+":"+(L?l_(L):"")))}catch(M){throw Y.from(M,Y.ERR_BAD_OPTION_VALUE,n)}}if(N.isFormData(o)&&(ft.hasStandardBrowserEnv||ft.hasStandardBrowserWebWorkerEnv||N.isReactNative(o)?h.setContentType(void 0):N.isFunction(o.getHeaders)&&a_(h,o.getHeaders(),s("formDataHeaderPolicy"))),ft.hasStandardBrowserEnv&&(N.isFunction(a)&&(a=a(t)),a===!0||a==null&&Jb(t.url))){const L=u&&d&&Zb.read(d);L&&h.set(u,L)}return t}const u_=typeof XMLHttpRequest<"u",c_=u_&&function(n){return new Promise(function(s,o){const a=By(n);let u=a.data;const d=wt.from(a.headers).normalize();let{responseType:h,onUploadProgress:p,onDownloadProgress:m}=a,y,v,k,L,M;function _(){L&&L(),M&&M(),a.cancelToken&&a.cancelToken.unsubscribe(y),a.signal&&a.signal.removeEventListener("abort",y)}let x=new XMLHttpRequest;x.open(a.method.toUpperCase(),a.url,!0),x.timeout=a.timeout;function E(){if(!x)return;const A=wt.from("getAllResponseHeaders"in x&&x.getAllResponseHeaders()),H={data:!h||h==="text"||h==="json"?x.responseText:x.response,status:x.status,statusText:x.statusText,headers:A,config:n,request:x};Uy(function(G){s(G),_()},function(G){o(G),_()},H),x=null}"onloadend"in x?x.onloadend=E:x.onreadystatechange=function(){!x||x.readyState!==4||x.status===0&&!(x.responseURL&&x.responseURL.startsWith("file:"))||setTimeout(E)},x.onabort=function(){x&&(o(new Y("Request aborted",Y.ECONNABORTED,n,x)),_(),x=null)},x.onerror=function(O){const H=O&&O.message?O.message:"Network Error",$=new Y(H,Y.ERR_NETWORK,n,x);$.event=O||null,o($),_(),x=null},x.ontimeout=function(){let O=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded";const H=a.transitional||fd;a.timeoutErrorMessage&&(O=a.timeoutErrorMessage),o(new Y(O,H.clarifyTimeoutError?Y.ETIMEDOUT:Y.ECONNABORTED,n,x)),_(),x=null},u===void 0&&d.setContentType(null),"setRequestHeader"in x&&N.forEach(Py(d),function(O,H){x.setRequestHeader(H,O)}),N.isUndefined(a.withCredentials)||(x.withCredentials=!!a.withCredentials),h&&h!=="json"&&(x.responseType=a.responseType),m&&([k,M]=Wa(m,!0),x.addEventListener("progress",k)),p&&x.upload&&([v,L]=Wa(p),x.upload.addEventListener("progress",v),x.upload.addEventListener("loadend",L)),(a.cancelToken||a.signal)&&(y=A=>{x&&(o(!A||A.type?new fi(null,n,x):A),x.abort(),_(),x=null)},a.cancelToken&&a.cancelToken.subscribe(y),a.signal&&(a.signal.aborted?y():a.signal.addEventListener("abort",y)));const I=Gb(a.url);if(I&&!ft.protocols.includes(I)){o(new Y("Unsupported protocol "+I+":",Y.ERR_BAD_REQUEST,n)),_();return}x.send(u||null)})},d_=(n,t)=>{if(n=n?n.filter(Boolean):[],!t&&!n.length)return;const s=new AbortController;let o=!1;const a=function(p){if(!o){o=!0,d();const m=p instanceof Error?p:this.reason;s.abort(m instanceof Y?m:new fi(m instanceof Error?m.message:m))}};let u=t&&setTimeout(()=>{u=null,a(new Y(`timeout of ${t}ms exceeded`,Y.ETIMEDOUT))},t);const d=()=>{n&&(u&&clearTimeout(u),u=null,n.forEach(p=>{p.unsubscribe?p.unsubscribe(a):p.removeEventListener("abort",a)}),n=null)};n.forEach(p=>p.addEventListener("abort",a,{once:!0}));const{signal:h}=s;return h.unsubscribe=()=>N.asap(d),h},f_=function*(n,t){let s=n.byteLength;if(s{const a=h_(n,t);let u=0,d,h=p=>{d||(d=!0,o&&o(p))};return new ReadableStream({async pull(p){try{const{done:m,value:y}=await a.next();if(m){h(),p.close();return}let v=y.byteLength;if(s){let k=u+=v;s(k)}p.enqueue(new Uint8Array(y))}catch(m){throw h(m),m}},cancel(p){return h(p),a.return()}},{highWaterMark:2})},qa=n=>n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102,m_=(n,t,s)=>t+2L>=2&&o.charCodeAt(L-2)===37&&o.charCodeAt(L-1)===51&&(o.charCodeAt(L)===68||o.charCodeAt(L)===100);m>=0&&(o.charCodeAt(m)===61?(p++,m--):y(m)&&(p++,m-=3)),p===1&&m>=0&&(o.charCodeAt(m)===61||y(m))&&p++;const k=Math.floor(d/4)*3-(p||0);return k>0?k:0}let u=0;for(let d=0,h=o.length;d=55296&&p<=56319&&d+1=56320&&m<=57343?(u+=4,d++):u+=3}else u+=3}return u}const pd="1.18.1",pm=64*1024,{isFunction:Ta}=N,y_=n=>encodeURIComponent(n).replace(/%([0-9A-F]{2})/gi,(t,s)=>String.fromCharCode(parseInt(s,16))),mm=n=>{if(!N.isString(n))return n;try{return decodeURIComponent(n)}catch{return n}},gm=(n,...t)=>{try{return!!n(...t)}catch{return!1}},v_=n=>{const t=n.indexOf("://");let s=n;return t!==-1&&(s=s.slice(t+3)),s.includes("@")||s.includes(":")},w_=n=>{const t=N.global!==void 0&&N.global!==null?N.global:globalThis,{ReadableStream:s,TextEncoder:o}=t;n=N.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},n);const{fetch:a,Request:u,Response:d}=n,h=a?Ta(a):typeof fetch=="function",p=Ta(u),m=Ta(d);if(!h)return!1;const y=h&&Ta(s),v=h&&(typeof o=="function"?(E=>I=>E.encode(I))(new o):async E=>new Uint8Array(await new u(E).arrayBuffer())),k=p&&y&&gm(()=>{let E=!1;const I=new u(ft.origin,{body:new s,method:"POST",get duplex(){return E=!0,"half"}}),A=I.headers.has("Content-Type");return I.body!=null&&I.body.cancel(),E&&!A}),L=m&&y&&gm(()=>N.isReadableStream(new d("").body)),M={stream:L&&(E=>E.body)};h&&["text","arrayBuffer","blob","formData","stream"].forEach(E=>{!M[E]&&(M[E]=(I,A)=>{let O=I&&I[E];if(O)return O.call(I);throw new Y(`Response type '${E}' is not supported`,Y.ERR_NOT_SUPPORT,A)})});const _=async E=>{if(E==null)return 0;if(N.isBlob(E))return E.size;if(N.isSpecCompliantForm(E))return(await new u(ft.origin,{method:"POST",body:E}).arrayBuffer()).byteLength;if(N.isArrayBufferView(E)||N.isArrayBuffer(E))return E.byteLength;if(N.isURLSearchParams(E)&&(E=E+""),N.isString(E))return(await v(E)).byteLength},x=async(E,I)=>{const A=N.toFiniteNumber(E.getContentLength());return A??_(I)};return async E=>{let{url:I,method:A,data:O,signal:H,cancelToken:$,timeout:G,onDownloadProgress:B,onUploadProgress:ie,responseType:ue,headers:Se,withCredentials:Te="same-origin",fetchOptions:xe,maxContentLength:J,maxBodyLength:be}=By(E);const Ee=N.isNumber(J)&&J>-1,_e=N.isNumber(be)&&be>-1,K=X=>N.hasOwnProp(E,X)?E[X]:void 0;let ae=a||fetch;ue=ue?(ue+"").toLowerCase():"text";let U=d_([H,$&&$.toAbortSignal()],G),P=null;const z=U&&U.unsubscribe&&(()=>{U.unsubscribe()});let ce,me=null;const he=()=>new Y("Request body larger than maxBodyLength limit",Y.ERR_BAD_REQUEST,E,P);try{let X;const ve=K("auth");if(ve){const we=N.getSafeProp(ve,"username")||"",at=N.getSafeProp(ve,"password")||"";X={username:we,password:at}}if(v_(I)){const we=new URL(I,ft.origin);if(!X&&(we.username||we.password)){const at=mm(we.username),Xt=mm(we.password);X={username:at,password:Xt}}(we.username||we.password)&&(we.username="",we.password="",I=we.href)}if(X&&(Se.delete("authorization"),Se.set("Authorization","Basic "+btoa(y_((X.username||"")+":"+(X.password||""))))),Ee&&typeof I=="string"&&I.startsWith("data:")&&g_(I)>J)throw new Y("maxContentLength size of "+J+" exceeded",Y.ERR_BAD_RESPONSE,E,P);if(_e&&A!=="get"&&A!=="head"){const we=await _(O);if(typeof we=="number"&&isFinite(we)&&(ce=we,we>be))throw he()}const Re=_e&&(N.isReadableStream(O)||N.isStream(O)),ye=(we,at,Xt)=>hm(we,pm,Yt=>{if(_e&&Yt>be)throw me=he();at&&at(Yt)},Xt);if(k&&A!=="get"&&A!=="head"&&(ie||Re)){if(ce=ce??await x(Se,O),ce!==0||Re){let we=new u(I,{method:"POST",body:O,duplex:"half"}),at;if(N.isFormData(O)&&(at=we.headers.get("content-type"))&&Se.setContentType(at),we.body){const[Xt,Yt]=ie&&um(ce,Wa(cm(ie)))||[];O=ye(we.body,Xt,Yt)}}}else if(Re&&!p&&y&&A!=="get"&&A!=="head")O=ye(O);else if(Re&&p&&!k&&A!=="get"&&A!=="head")throw new Y("Stream request bodies are not supported by the current fetch implementation",Y.ERR_NOT_SUPPORT,E,P);N.isString(Te)||(Te=Te?"include":"omit");const tt=p&&"credentials"in u.prototype;if(N.isFormData(O)){const we=Se.getContentType();we&&/^multipart\/form-data/i.test(we)&&!/boundary=/i.test(we)&&Se.delete("content-type")}Se.set("User-Agent","axios/"+pd,!1);const Dt={...xe,signal:U,method:A.toUpperCase(),headers:Py(Se.normalize()),body:O,duplex:"half",credentials:tt?Te:void 0};P=p&&new u(I,Dt);let it=await(p?ae(P,xe):ae(I,Dt));const Gt=wt.from(it.headers);if(Ee){const we=N.toFiniteNumber(Gt.getContentLength());if(we!=null&&we>J)throw new Y("maxContentLength size of "+J+" exceeded",Y.ERR_BAD_RESPONSE,E,P)}const Mt=L&&(ue==="stream"||ue==="response");if(L&&it.body&&(B||Ee||Mt&&z)){const we={};["status","statusText","headers"].forEach(bn=>{we[bn]=it[bn]});const at=N.toFiniteNumber(Gt.getContentLength()),[Xt,Yt]=B&&um(at,Wa(cm(B),!0))||[];let Dn=0;const Mn=bn=>{if(Ee&&(Dn=bn,Dn>J))throw new Y("maxContentLength size of "+J+" exceeded",Y.ERR_BAD_RESPONSE,E,P);Xt&&Xt(bn)};it=new d(hm(it.body,pm,Mn,()=>{Yt&&Yt(),z&&z()}),we)}ue=ue||"text";let Ut=await M[N.findKey(M,ue)||"text"](it,E);if(Ee&&!L&&!Mt){let we;if(Ut!=null&&(typeof Ut.byteLength=="number"?we=Ut.byteLength:typeof Ut.size=="number"?we=Ut.size:typeof Ut=="string"&&(we=typeof o=="function"?new o().encode(Ut).byteLength:Ut.length)),typeof we=="number"&&we>J)throw new Y("maxContentLength size of "+J+" exceeded",Y.ERR_BAD_RESPONSE,E,P)}return!Mt&&z&&z(),await new Promise((we,at)=>{Uy(we,at,{data:Ut,headers:wt.from(it.headers),status:it.status,statusText:it.statusText,config:E,request:P})})}catch(X){if(z&&z(),U&&U.aborted&&U.reason instanceof Y){const ve=U.reason;throw ve.config=E,P&&(ve.request=P),X!==ve&&Object.defineProperty(ve,"cause",{__proto__:null,value:X,writable:!0,enumerable:!1,configurable:!0}),ve}if(me)throw P&&!me.request&&(me.request=P),me;if(X instanceof Y)throw P&&!X.request&&(X.request=P),X;if(X&&X.name==="TypeError"&&/Load failed|fetch/i.test(X.message)){const ve=new Y("Network Error",Y.ERR_NETWORK,E,P,X&&X.response);throw Object.defineProperty(ve,"cause",{__proto__:null,value:X.cause||X,writable:!0,enumerable:!1,configurable:!0}),ve}throw Y.from(X,X&&X.code,E,P,X&&X.response)}}},x_=new Map,$y=n=>{let t=n&&n.env||{};const{fetch:s,Request:o,Response:a}=t,u=[o,a,s];let d=u.length,h=d,p,m,y=x_;for(;h--;)p=u[h],m=y.get(p),m===void 0&&y.set(p,m=h?new Map:w_(t)),y=m;return m};$y();const md={http:Lb,xhr:c_,fetch:{get:$y}};N.forEach(md,(n,t)=>{if(n){try{Object.defineProperty(n,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(n,"adapterName",{__proto__:null,value:t})}});const ym=n=>`- ${n}`,S_=n=>N.isFunction(n)||n===null||n===!1;function E_(n,t){n=N.isArray(n)?n:[n];const{length:s}=n;let o,a;const u={};for(let d=0;d`adapter ${p} `+(m===!1?"is not supported by the environment":"is not available in the build"));let h=s?d.length>1?`since : `+d.map(ym).join(` `):" "+ym(d[0]):"as no adapter specified";throw new Y("There is no suitable adapter to dispatch the request "+h,Y.ERR_NOT_SUPPORT)}return a}const Hy={getAdapter:E_,adapters:md};function nc(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new fi(null,n)}function vm(n){return nc(n),n.headers=wt.from(n.headers),n.data=tc.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),Hy.getAdapter(n.adapter||di.adapter,n)(n).then(function(o){nc(n),n.response=o;try{o.data=tc.call(n,n.transformResponse,o)}finally{delete n.response}return o.headers=wt.from(o.headers),o},function(o){if(!My(o)&&(nc(n),o&&o.response)){n.response=o.response;try{o.response.data=tc.call(n,n.transformResponse,o.response)}finally{delete n.response}o.response.headers=wt.from(o.response.headers)}return Promise.reject(o)})}const Xa={};["object","boolean","number","function","string","symbol"].forEach((n,t)=>{Xa[n]=function(o){return typeof o===n||"a"+(t<1?"n ":" ")+n}});const wm={};Xa.transitional=function(t,s,o){function a(u,d){return"[Axios v"+pd+"] Transitional option '"+u+"'"+d+(o?". "+o:"")}return(u,d,h)=>{if(t===!1)throw new Y(a(d," has been removed"+(s?" in "+s:"")),Y.ERR_DEPRECATED);return s&&!wm[d]&&(wm[d]=!0,console.warn(a(d," has been deprecated since v"+s+" and will be removed in the near future"))),t?t(u,d,h):!0}};Xa.spelling=function(t){return(s,o)=>(console.warn(`${o} is likely a misspelling of ${t}`),!0)};function b_(n,t,s){if(typeof n!="object"||n===null)throw new Y("options must be an object",Y.ERR_BAD_OPTION_VALUE);const o=Object.keys(n);let a=o.length;for(;a-- >0;){const u=o[a],d=Object.prototype.hasOwnProperty.call(t,u)?t[u]:void 0;if(d){const h=n[u],p=h===void 0||d(h,u,n);if(p!==!0)throw new Y("option "+u+" must be "+p,Y.ERR_BAD_OPTION_VALUE);continue}if(s!==!0)throw new Y("Unknown option "+u,Y.ERR_BAD_OPTION)}}const ja={assertOptions:b_,validators:Xa},yt=ja.validators;let Kr=class{constructor(t){this.defaults=t||{},this.interceptors={request:new am,response:new am}}async request(t,s){try{return await this._request(t,s)}catch(o){if(o instanceof Error){let a={};Error.captureStackTrace?Error.captureStackTrace(a):a=new Error;const u=(()=>{if(!a.stack)return"";const d=a.stack.indexOf(` `);return d===-1?"":a.stack.slice(d+1)})();try{if(!o.stack)o.stack=u;else if(u){const d=u.indexOf(` `),h=d===-1?-1:u.indexOf(` `,d+1),p=h===-1?"":u.slice(h+1);String(o.stack).endsWith(p)||(o.stack+=` `+u)}}catch{}}throw o}}_request(t,s){typeof t=="string"?(s=s||{},s.url=t):s=t||{},s=es(this.defaults,s);const{transitional:o,paramsSerializer:a,headers:u}=s;o!==void 0&&ja.assertOptions(o,{silentJSONParsing:yt.transitional(yt.boolean),forcedJSONParsing:yt.transitional(yt.boolean),clarifyTimeoutError:yt.transitional(yt.boolean),legacyInterceptorReqResOrdering:yt.transitional(yt.boolean),advertiseZstdAcceptEncoding:yt.transitional(yt.boolean),validateStatusUndefinedResolves:yt.transitional(yt.boolean)},!1),a!=null&&(N.isFunction(a)?s.paramsSerializer={serialize:a}:ja.assertOptions(a,{encode:yt.function,serialize:yt.function},!0)),s.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?s.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:s.allowAbsoluteUrls=!0),ja.assertOptions(s,{baseUrl:yt.spelling("baseURL"),withXsrfToken:yt.spelling("withXSRFToken")},!0),s.method=(s.method||this.defaults.method||"get").toLowerCase();let d=u&&N.merge(u.common,u[s.method]);u&&N.forEach(["delete","get","head","post","put","patch","query","common"],M=>{delete u[M]}),s.headers=wt.concat(d,u);const h=[];let p=!0;this.interceptors.request.forEach(function(_){if(typeof _.runWhen=="function"&&_.runWhen(s)===!1)return;p=p&&_.synchronous;const x=s.transitional||fd;x&&x.legacyInterceptorReqResOrdering?h.unshift(_.fulfilled,_.rejected):h.push(_.fulfilled,_.rejected)});const m=[];this.interceptors.response.forEach(function(_){m.push(_.fulfilled,_.rejected)});let y,v=0,k;if(!p){const M=[vm.bind(this),void 0];for(M.unshift(...h),M.push(...m),k=M.length,y=Promise.resolve(s);v{if(!o._listeners)return;let u=o._listeners.length;for(;u-- >0;)o._listeners[u](a);o._listeners=null}),this.promise.then=a=>{let u;const d=new Promise(h=>{o.subscribe(h),u=h}).then(a);return d.cancel=function(){o.unsubscribe(u)},d},t(function(u,d,h){o.reason||(o.reason=new fi(u,d,h),s(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const s=this._listeners.indexOf(t);s!==-1&&this._listeners.splice(s,1)}toAbortSignal(){const t=new AbortController,s=o=>{t.abort(o)};return this.subscribe(s),t.signal.unsubscribe=()=>this.unsubscribe(s),t.signal}static source(){let t;return{token:new Vy(function(a){t=a}),cancel:t}}};function k_(n){return function(s){return n.apply(null,s)}}function C_(n){return N.isObject(n)&&n.isAxiosError===!0}const Dc={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Dc).forEach(([n,t])=>{Dc[t]=n});function Wy(n){const t=new Kr(n),s=Sy(Kr.prototype.request,t);return N.extend(s,Kr.prototype,t,{allOwnKeys:!0}),N.extend(s,t,null,{allOwnKeys:!0}),s.create=function(a){return Wy(es(n,a))},s}const Ke=Wy(di);Ke.Axios=Kr;Ke.CanceledError=fi;Ke.CancelToken=__;Ke.isCancel=My;Ke.VERSION=pd;Ke.toFormData=Ga;Ke.AxiosError=Y;Ke.Cancel=Ke.CanceledError;Ke.all=function(t){return Promise.all(t)};Ke.spread=k_;Ke.isAxiosError=C_;Ke.mergeConfig=es;Ke.AxiosHeaders=wt;Ke.formToJSON=n=>Dy(N.isHTMLForm(n)?new FormData(n):n);Ke.getAdapter=Hy.getAdapter;Ke.HttpStatusCode=Dc;Ke.default=Ke;const{Axios:YC,AxiosError:JC,CanceledError:ZC,isCancel:eR,CancelToken:tR,VERSION:nR,all:rR,Cancel:sR,isAxiosError:oR,spread:iR,toFormData:aR,AxiosHeaders:lR,HttpStatusCode:uR,formToJSON:cR,getAdapter:dR,mergeConfig:fR,create:hR}=Ke,qy=typeof window>"u",xm=!qy&&window.self!==window.top,R_=!qy&&typeof document>"u",rc=()=>Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),ct=[];for(let n=0;n<256;++n)ct.push((n+256).toString(16).slice(1));function T_(n,t=0){return(ct[n[t+0]]+ct[n[t+1]]+ct[n[t+2]]+ct[n[t+3]]+"-"+ct[n[t+4]]+ct[n[t+5]]+"-"+ct[n[t+6]]+ct[n[t+7]]+"-"+ct[n[t+8]]+ct[n[t+9]]+"-"+ct[n[t+10]]+ct[n[t+11]]+ct[n[t+12]]+ct[n[t+13]]+ct[n[t+14]]+ct[n[t+15]]).toLowerCase()}let sc;const A_=new Uint8Array(16);function P_(){if(!sc){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");sc=crypto.getRandomValues.bind(crypto)}return sc(A_)}const N_=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Sm={randomUUID:N_};function O_(n,t,s){var a;n=n||{};const o=n.random??((a=n.rng)==null?void 0:a.call(n))??P_();if(o.length<16)throw new Error("Random bytes length must be >= 16");return o[6]=o[6]&15|64,o[8]=o[8]&63|128,T_(o)}function L_(n,t,s){return Sm.randomUUID&&!n?Sm.randomUUID():O_(n)}const Mo=typeof window<"u"?window:{base44SharedInstances:{}};function I_(n,t){return Mo.base44SharedInstances||(Mo.base44SharedInstances={}),Mo.base44SharedInstances[n]||(Mo.base44SharedInstances[n]={instance:t()}),Mo.base44SharedInstances[n].instance}const F_="__user_heartbeat_event__",j_="__initialization_event__",D_="__session_duration_event__",Em="analytics-enable",bm="base44_analytics_session_id",M_={enabled:!0,maxQueueSize:1e3,throttleTime:1e3,batchSize:30,heartBeatInterval:60*1e3},U_="analytics",De=I_(U_,()=>({requestsQueue:[],isProcessing:!1,isHeartBeatProcessing:!1,wasInitializationTracked:!1,sessionContext:null,sessionStartTime:null,config:{...M_,...Q_()}})),z_=({axiosClient:n,serverUrl:t,appId:s,userAuthModule:o})=>{var a;const{maxQueueSize:u,throttleTime:d,batchSize:h}=De.config;if(!(!((a=De.config)===null||a===void 0)&&a.enabled)||R_)return{track:()=>{},cleanup:()=>{}};let p;const m=`${t}/api/apps/${s}/analytics/track/batch`,y=async A=>{await n.request({method:"POST",url:`/apps/${s}/analytics/track/batch`,data:{events:A}})},v=A=>{try{const O=JSON.stringify({events:A}),H=new Blob([O],{type:"application/json"});return typeof navigator>"u"||O.length>6e4||!navigator.sendBeacon(m,H)}catch{return!1}},k=async(A,O={})=>{if(A.length===0)return;const H=await q_(o),$=A.map(W_(H));try{(!O.isBeacon||!v($))&&await y($)}catch{}},L=()=>{km(k,{throttleTime:d,batchSize:h})},M=A=>{if(De.requestsQueue.length>=u)return;const O=V_();De.requestsQueue.push({...A,...O}),L()},_=()=>{km(k,{throttleTime:d,batchSize:h}),p=Cm(M),$_()},x=()=>{_m(),p==null||p(),H_(M);const A=De.requestsQueue.splice(0);k(A,{isBeacon:!0})},E=()=>{typeof window>"u"||(document.visibilityState==="hidden"?x():document.visibilityState==="visible"&&_())},I=()=>{_m(),p==null||p(),typeof window<"u"&&window.removeEventListener("visibilitychange",E)};return L(),p=Cm(M),B_(M),typeof window<"u"&&window.addEventListener("visibilitychange",E),{track:M,cleanup:I}};function _m(){De.isProcessing=!1}async function km(n,t){if(De.isProcessing)return;De.isProcessing=!0;const{throttleTime:s=1e3,batchSize:o=30}=t??{};for(;De.isProcessing&&De.requestsQueue.length>0;){const a=De.requestsQueue.splice(0,o);a.length&&await n(a),await new Promise(u=>setTimeout(u,s))}De.isProcessing=!1}function Cm(n){var t;if(De.isHeartBeatProcessing||((t=De.config.heartBeatInterval)!==null&&t!==void 0?t:0)<10)return()=>{};De.isHeartBeatProcessing=!0;const s=setInterval(()=>{n({eventName:F_})},De.config.heartBeatInterval);return()=>{clearInterval(s),De.isHeartBeatProcessing=!1}}function B_(n){typeof window>"u"||De.wasInitializationTracked||(De.wasInitializationTracked=!0,n({eventName:j_,properties:{referrer:document==null?void 0:document.referrer}}))}function $_(){typeof window>"u"||De.sessionStartTime!==null||(De.sessionStartTime=new Date().toISOString())}function H_(n){if(typeof window>"u"||De.sessionStartTime===null)return;const t=new Date().getTime()-new Date(De.sessionStartTime).getTime();De.sessionStartTime=null,n({eventName:D_,properties:{sessionDuration:t}})}function V_(){return{timestamp:new Date().toISOString(),pageUrl:typeof window<"u"?window.location.pathname:null}}function W_(n){return t=>({event_name:t.eventName,properties:t.properties,timestamp:t.timestamp,page_url:t.pageUrl,...n})}let oc=null;async function q_(n){if(!De.sessionContext){if(!oc){const t=gd();oc=n.me().then(s=>({user_id:s.id,session_id:t})).catch(()=>({user_id:null,session_id:t}))}De.sessionContext=await oc}return De.sessionContext}function Q_(){if(typeof window>"u"||!window.location)return;const t=new URLSearchParams(window.location.search).get(Em);if(t==null||!t.length)return;const s=new URLSearchParams(window.location.search);s.delete(Em);const o=window.location.pathname+(s.toString()?"?"+s.toString():"");return window.history.replaceState({},"",o),{enabled:t==="true"}}function gd(){if(typeof window>"u")return rc();try{const n=localStorage.getItem(bm);if(!n){const t=rc();return localStorage.setItem(bm,t),t}return n}catch{return rc()}}class K_ extends Error{constructor(t,s,o,a,u){super(t),this.name="Base44Error",this.status=s,this.code=o,this.data=a,this.originalError=u}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code,data:this.data}}}function $o({baseURL:n,headers:t={},token:s,interceptResponses:o=!0,onError:a}){const u=Ke.create({baseURL:n,headers:{"Content-Type":"application/json",Accept:"application/json",...t}});return s&&(u.defaults.headers.common.Authorization=`Bearer ${s}`),u.interceptors.request.use(d=>{typeof window<"u"&&window.location&&(d.headers.set("X-Origin-URL",window.location.href),d.headers.get("Authorization")||d.headers.set("X-Base44-Anonymous-Id",gd()));const h=L_();if(d.requestId=h,xm)try{window.parent.postMessage({type:"api-request-start",requestId:h,data:{url:n+d.url,method:d.method,body:d.data instanceof FormData?"[FormData object]":d.data}},"*")}catch{}return d}),o&&u.interceptors.response.use(d=>{var h;const p=(h=d.config)===null||h===void 0?void 0:h.requestId;try{xm&&p&&window.parent.postMessage({type:"api-request-end",requestId:p,data:{statusCode:d.status,response:d.data}},"*")}catch{}return d.data},d=>{var h,p,m,y,v,k,L,M;const _=((p=(h=d.response)===null||h===void 0?void 0:h.data)===null||p===void 0?void 0:p.message)||((y=(m=d.response)===null||m===void 0?void 0:m.data)===null||y===void 0?void 0:y.detail)||d.message,x=new K_(_,(v=d.response)===null||v===void 0?void 0:v.status,(L=(k=d.response)===null||k===void 0?void 0:k.data)===null||L===void 0?void 0:L.code,(M=d.response)===null||M===void 0?void 0:M.data,d);return a==null||a(x),Promise.reject(x)}),u}function Rm(n){const{axios:t,appId:s,getSocket:o}=n;return new Proxy({},{get(a,u){if(!(typeof u!="string"||u==="then"||u.startsWith("_")))return X_(t,s,u,o)}})}function G_(n){var t;try{const s=JSON.parse(n);return{type:s.type,data:s.data,id:s.id||((t=s.data)===null||t===void 0?void 0:t.id),timestamp:s.timestamp||new Date().toISOString()}}catch(s){return console.warn("[Base44 SDK] Failed to parse realtime message:",s),null}}function X_(n,t,s,o){const a=`/apps/${t}/entities/${s}`;return{async list(u,d,h,p){const m={};return u&&(m.sort=u),d&&(m.limit=d),h&&(m.skip=h),p&&(m.fields=Array.isArray(p)?p.join(","):p),n.get(a,{params:m})},async filter(u,d,h,p,m){const y={q:JSON.stringify(u)};return d&&(y.sort=d),h&&(y.limit=h),p&&(y.skip=p),m&&(y.fields=Array.isArray(m)?m.join(","):m),n.get(a,{params:y})},async get(u){return n.get(`${a}/${u}`)},async create(u){return n.post(a,u)},async update(u,d){return n.put(`${a}/${u}`,d)},async delete(u){return n.delete(`${a}/${u}`)},async deleteMany(u){return n.delete(a,{data:u})},async bulkCreate(u){return n.post(`${a}/bulk`,u)},async updateMany(u,d){return n.patch(`${a}/update-many`,{query:u,data:d})},async bulkUpdate(u){return n.put(`${a}/bulk`,u)},async importEntities(u){const d=new FormData;return d.append("file",u,u.name),n.post(`${a}/import`,d,{headers:{"Content-Type":"multipart/form-data"}})},subscribe(u){const d=`entities:${t}:${s}`;return o().subscribeToRoom(d,{update_model:m=>{var y;const v=G_(m.data);if(v){v.type!=="delete"&&(!((y=v.data)===null||y===void 0)&&y._oversize)&&console.error(`[Base44 SDK] Realtime broadcast for ${s}#${v.id} was oversize and got slimmed for transport. Fields >10 KB are empty and the rest of the record may be a stub. Call \`entities.${s}.get("${v.id}")\` to fetch the full record.`);try{u(v)}catch(k){console.error("[Base44 SDK] Subscription callback error:",k)}}}})}}}function Y_(n,t){return{async call(s,o,a){if(!(s!=null&&s.trim()))throw new Error("Integration slug is required and cannot be empty");if(!(o!=null&&o.trim()))throw new Error("Operation ID is required and cannot be empty");const{pathParams:u,queryParams:d,...h}=a??{},p={...h,...u&&{path_params:u},...d&&{query_params:d}};return await n.post(`/apps/${t}/integrations/custom/${s}/${o}`,p)}}}function Tm(n,t){const s=Y_(n,t);return new Proxy({},{get(o,a){if(!(typeof a!="string"||a==="then"||a.startsWith("_")))return a==="custom"?s:new Proxy({},{get(u,d){if(!(typeof d!="string"||d==="then"||d.startsWith("_")))return async h=>{if(typeof h=="string")throw new Error(`Integration ${d} must receive an object with named parameters, received: ${h}`);let p,m;return h instanceof FormData||h&&Object.values(h).some(y=>y instanceof File)?(p=new FormData,Object.keys(h).forEach(y=>{h[y]instanceof File?p.append(y,h[y],h[y].name):typeof h[y]=="object"&&h[y]!==null?p.append(y,JSON.stringify(h[y])):p.append(y,h[y])}),m="multipart/form-data"):(p=h,m="application/json"),a==="Core"?n.post(`/apps/${t}/integration-endpoints/Core/${d}`,p||h,{headers:{"Content-Type":m}}):n.post(`/apps/${t}/integration-endpoints/installable/${a}/integration-endpoints/${d}`,p||h,{headers:{"Content-Type":m}})}}})}})}function J_(){return typeof window>"u"?!1:window!==window.parent}function Z_(n,t,s){const u=Math.round(window.screenX+(window.outerWidth-500)/2),d=Math.round(window.screenY+(window.outerHeight-600)/2),h=window.open(n,"base44_auth",`width=500,height=600,left=${u},top=${d},resizable=yes,scrollbars=yes`);if(!h)return;const p=()=>{window.removeEventListener("message",m),clearInterval(y),h.closed||h.close()},m=v=>{var k;if(v.origin!==s||v.source!==h||!(!((k=v.data)===null||k===void 0)&&k.access_token))return;p();const L=new URL(t),{access_token:M,is_new_user:_}=v.data;L.searchParams.set("access_token",M),_!=null&&L.searchParams.set("is_new_user",String(_)),window.location.href=L.toString()},y=setInterval(()=>{h.closed&&p()},500);window.addEventListener("message",m)}function ek(n,t,s,o){return{async me(){return n.get(`/apps/${s}/entities/User/me`)},async updateMe(a){return n.put(`/apps/${s}/entities/User/me`,a)},redirectToLogin(a){if(typeof window>"u")throw new Error("Login method can only be used in a browser environment");const u=a?new URL(a,window.location.origin).toString():window.location.href,d=`${o.appBaseUrl}/login?from_url=${encodeURIComponent(u)}`;window.location.href=d},loginWithProvider(a,u="/"){const d=new URL(u,window.location.origin).toString(),h=`app_id=${s}&from_url=${encodeURIComponent(d)}`;let p;a==="sso"?p=`/apps/${s}/auth/sso/login`:p=`/apps/auth${a==="google"?"":`/${a}`}/login`;const m=`${o.appBaseUrl}/api${p}?${h}`;if(J_()){const y=`${m}&popup_origin=${encodeURIComponent(window.location.origin)}`;return Z_(y,d,window.location.origin)}window.location.href=m},logout(a){if(delete n.defaults.headers.common.Authorization,typeof window<"u"){if(window.localStorage)try{window.localStorage.removeItem("base44_access_token"),window.localStorage.removeItem("token")}catch(h){console.error("Failed to remove token from localStorage:",h)}const u=a||window.location.href,d=`${o.appBaseUrl}/api/apps/auth/logout?from_url=${encodeURIComponent(u)}`;window.location.href=d}},setToken(a,u=!0){if(a&&(n.defaults.headers.common.Authorization=`Bearer ${a}`,t.defaults.headers.common.Authorization=`Bearer ${a}`,u&&typeof window<"u"&&window.localStorage))try{window.localStorage.setItem("base44_access_token",a),window.localStorage.setItem("token",a)}catch(d){console.error("Failed to save token to localStorage:",d)}},async loginViaEmailPassword(a,u,d){var h;try{const p=await n.post(`/apps/${s}/auth/login`,{email:a,password:u,...d&&{turnstile_token:d}}),{access_token:m,user:y}=p;return m&&this.setToken(m),{access_token:m,user:y}}catch(p){throw((h=p.response)===null||h===void 0?void 0:h.status)===401&&await this.logout(),p}},async isAuthenticated(){try{return await this.me(),!0}catch{return!1}},inviteUser(a,u){return n.post(`/apps/${s}/users/invite-user`,{user_email:a,role:u})},register(a){return n.post(`/apps/${s}/auth/register`,a)},verifyOtp({email:a,otpCode:u}){return n.post(`/apps/${s}/auth/verify-otp`,{email:a,otp_code:u})},resendOtp(a){return n.post(`/apps/${s}/auth/resend-otp`,{email:a})},resetPasswordRequest(a){return n.post(`/apps/${s}/auth/reset-password-request`,{email:a})},resetPassword({resetToken:a,newPassword:u}){return n.post(`/apps/${s}/auth/reset-password`,{reset_token:a,new_password:u})},changePassword({userId:a,currentPassword:u,newPassword:d}){return n.post(`/apps/${s}/auth/change-password`,{user_id:a,current_password:u,new_password:d})}}}function tk(n,t){return{async getAccessToken(s){const o=`/apps/${t}/auth/sso/accesstoken/${s}`;return n.get(o)},async getIdToken(s){const o=`/apps/${t}/auth/sso/idtoken/${s}`;return n.get(o)}}}function nk(n,t){return{async getAccessToken(s){if(!s||typeof s!="string")throw new Error("Integration type is required and must be a string");return(await n.get(`/apps/${t}/external-auth/tokens/${s}`)).access_token},async getConnection(s){var o;if(!s||typeof s!="string")throw new Error("Integration type is required and must be a string");const u=await n.get(`/apps/${t}/external-auth/tokens/${s}`);return{accessToken:u.access_token,connectionConfig:(o=u.connection_config)!==null&&o!==void 0?o:null}},async getWorkspaceConnection(s){var o;if(!s||typeof s!="string")throw new Error("Connector ID is required and must be a string");const u=await n.get(`/apps/${t}/external-auth/tokens/connectors/${s}`);return{accessToken:u.access_token,connectionConfig:(o=u.connection_config)!==null&&o!==void 0?o:null}},async getCurrentAppUserAccessToken(s){if(!s||typeof s!="string")throw new Error("Connector ID is required and must be a string");return(await n.get(`/apps/${t}/app-user-auth/connectors/${s}/token`)).access_token},async getCurrentAppUserConnection(s){var o;if(!s||typeof s!="string")throw new Error("Connector ID is required and must be a string");const u=await n.get(`/apps/${t}/app-user-auth/connectors/${s}/token`);return{accessToken:u.access_token,connectionConfig:(o=u.connection_config)!==null&&o!==void 0?o:null}}}}function rk(n,t){return{async connectAppUser(s){if(!s||typeof s!="string")throw new Error("Connector ID is required and must be a string");return(await n.post(`/apps/${t}/app-user-auth/connectors/${s}/initiate`)).redirect_url},async disconnectAppUser(s){if(!s||typeof s!="string")throw new Error("Connector ID is required and must be a string");await n.delete(`/apps/${t}/app-user-auth/connectors/${s}`)}}}function Gr(n={}){const{storageKey:t="base44_access_token",paramName:s="access_token",saveToStorage:o=!0,removeFromUrl:a=!0}=n;let u=null;if(typeof window<"u"&&window.location)try{const d=new URLSearchParams(window.location.search);if(u=d.get(s),u){if(o&&sk(u,{storageKey:t}),a){d.delete(s);const h=`${window.location.pathname}${d.toString()?`?${d.toString()}`:""}${window.location.hash}`;window.history.replaceState({},document.title,h)}return u}}catch(d){console.error("Error retrieving token from URL:",d)}if(typeof window<"u"&&window.localStorage)try{return u=window.localStorage.getItem(t),u}catch(d){console.error("Error retrieving token from local storage:",d)}return null}function sk(n,t){const{storageKey:s="base44_access_token"}=t;if(typeof window>"u"||!window.localStorage||!n)return!1;try{return window.localStorage.setItem(s,n),window.localStorage.setItem("token",n),!0}catch(o){return console.error("Error saving token to local storage:",o),!1}}function Am(n,t,s){const o=(u,d)=>u?`${String(u).replace(/\/$/,"")}${d}`:d,a=u=>{const d=new Headers;if(s!=null&&s.getAuthHeaders){const h=s.getAuthHeaders();Object.entries(h).forEach(([p,m])=>{m!=null&&d.set(p,String(m))})}return u&&new Headers(u).forEach((h,p)=>{d.set(p,h)}),d};return{async invoke(u,d){if(typeof d=="string")throw new Error(`Function ${u} must receive an object with named parameters, received: ${d}`);let h,p;return d instanceof FormData||d&&Object.values(d).some(m=>m instanceof File)?(h=new FormData,Object.keys(d).forEach(m=>{d[m]instanceof File?h.append(m,d[m],d[m].name):typeof d[m]=="object"&&d[m]!==null?h.append(m,JSON.stringify(d[m])):h.append(m,d[m])}),p="multipart/form-data"):(h=d,p="application/json"),n.post(`/apps/${t}/functions/${u}`,h||d,{headers:{"Content-Type":p}})},async fetch(u,d={}){const p=`/functions${u.startsWith("/")?u:`/${u}`}`,m=a(d.headers),y={...d,headers:m};return await fetch(o(s==null?void 0:s.baseURL,p),y)}}}function Pm({axios:n,getSocket:t,appId:s,serverUrl:o,token:a}){const u=`/apps/${s}/agents`,d={},h=()=>n.get(`${u}/conversations`),p=_=>n.get(`${u}/conversations/${_}`);return{getConversations:h,getConversation:p,listConversations:_=>n.get(`${u}/conversations`,{params:_}),createConversation:_=>n.post(`${u}/conversations`,_),addMessage:async(_,x)=>n.post(`${u}/conversations/v2/${_.id}/messages`,x),subscribeToConversation:(_,x)=>{const E=`/agent-conversations/${_}`,I=t(),A=p(_).then(O=>(d[_]=O,O));return I.subscribeToRoom(E,{connect:()=>{},update_model:async({data:O})=>{const H=JSON.parse(O);if(H._message){await A;const $=H._message,G=d[_];if(G){const B=G.messages||[],ie=B.findIndex(Se=>Se.id===$.id),ue=ie!==-1?B.map((Se,Te)=>Te===ie?$:Se):[...B,$];d[_]={...G,messages:ue},x==null||x(d[_])}}}})},getWhatsAppConnectURL:_=>{const x=`${o}/api/apps/${s}/agents/${encodeURIComponent(_)}/whatsapp`,E=a??Gr();return E?`${x}?token=${E}`:x},getTelegramConnectURL:_=>{const x=`${o}/api/apps/${s}/agents/${encodeURIComponent(_)}/telegram`,E=a??Gr();return E?`${x}?token=${E}`:x}}}function Nm({serverUrl:n,token:t,appId:s}){return{connection:()=>{var a;return{baseURL:`${n}/api/apps/${s}/ai/openai/v1`,token:(a=t??Gr())!==null&&a!==void 0?a:""}}}}function Om(n,t){const s=`/app-logs/${t}`;return{async logUserInApp(o){await n.post(`${s}/log-user-in-app/${o}`)},async fetchLogs(o={}){return await n.get(s,{params:o})},async getStats(o={}){return await n.get(`${s}/stats`,{params:o})}}}function ok(n,t){return{async inviteUser(s,o){if(o!=="user"&&o!=="admin")throw new Error(`Invalid role: "${o}". Role must be either "user" or "admin".`);return await n.post(`/apps/${t}/runtime/users/invite-user`,{user_email:s,role:o})}}}const Sn=Object.create(null);Sn.open="0";Sn.close="1";Sn.ping="2";Sn.pong="3";Sn.message="4";Sn.upgrade="5";Sn.noop="6";const Da=Object.create(null);Object.keys(Sn).forEach(n=>{Da[Sn[n]]=n});const Mc={type:"error",data:"parser error"},Qy=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Ky=typeof ArrayBuffer=="function",Gy=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n&&n.buffer instanceof ArrayBuffer,yd=({type:n,data:t},s,o)=>Qy&&t instanceof Blob?s?o(t):Lm(t,o):Ky&&(t instanceof ArrayBuffer||Gy(t))?s?o(t):Lm(new Blob([t]),o):o(Sn[n]+(t||"")),Lm=(n,t)=>{const s=new FileReader;return s.onload=function(){const o=s.result.split(",")[1];t("b"+(o||""))},s.readAsDataURL(n)};function Im(n){return n instanceof Uint8Array?n:n instanceof ArrayBuffer?new Uint8Array(n):new Uint8Array(n.buffer,n.byteOffset,n.byteLength)}let ic;function ik(n,t){if(Qy&&n.data instanceof Blob)return n.data.arrayBuffer().then(Im).then(t);if(Ky&&(n.data instanceof ArrayBuffer||Gy(n.data)))return t(Im(n.data));yd(n,!1,s=>{ic||(ic=new TextEncoder),t(ic.encode(s))})}const Fm="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ho=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let n=0;n{let t=n.length*.75,s=n.length,o,a=0,u,d,h,p;n[n.length-1]==="="&&(t--,n[n.length-2]==="="&&t--);const m=new ArrayBuffer(t),y=new Uint8Array(m);for(o=0;o>4,y[a++]=(d&15)<<4|h>>2,y[a++]=(h&3)<<6|p&63;return m},lk=typeof ArrayBuffer=="function",vd=(n,t)=>{if(typeof n!="string")return{type:"message",data:Xy(n,t)};const s=n.charAt(0);return s==="b"?{type:"message",data:uk(n.substring(1),t)}:Da[s]?n.length>1?{type:Da[s],data:n.substring(1)}:{type:Da[s]}:Mc},uk=(n,t)=>{if(lk){const s=ak(n);return Xy(s,t)}else return{base64:!0,data:n}},Xy=(n,t)=>{switch(t){case"blob":return n instanceof Blob?n:new Blob([n]);case"arraybuffer":default:return n instanceof ArrayBuffer?n:n.buffer}},Yy="",ck=(n,t)=>{const s=n.length,o=new Array(s);let a=0;n.forEach((u,d)=>{yd(u,!1,h=>{o[d]=h,++a===s&&t(o.join(Yy))})})},dk=(n,t)=>{const s=n.split(Yy),o=[];for(let a=0;a{const o=s.length;let a;if(o<126)a=new Uint8Array(1),new DataView(a.buffer).setUint8(0,o);else if(o<65536){a=new Uint8Array(3);const u=new DataView(a.buffer);u.setUint8(0,126),u.setUint16(1,o)}else{a=new Uint8Array(9);const u=new DataView(a.buffer);u.setUint8(0,127),u.setBigUint64(1,BigInt(o))}n.data&&typeof n.data!="string"&&(a[0]|=128),t.enqueue(a),t.enqueue(s)})}})}let ac;function Aa(n){return n.reduce((t,s)=>t+s.length,0)}function Pa(n,t){if(n[0].length===t)return n.shift();const s=new Uint8Array(t);let o=0;for(let a=0;aMath.pow(2,21)-1){h.enqueue(Mc);break}a=y*Math.pow(2,32)+m.getUint32(4),o=3}else{if(Aa(s)n){h.enqueue(Mc);break}}}})}const Jy=4;function Xe(n){if(n)return pk(n)}function pk(n){for(var t in Xe.prototype)n[t]=Xe.prototype[t];return n}Xe.prototype.on=Xe.prototype.addEventListener=function(n,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+n]=this._callbacks["$"+n]||[]).push(t),this};Xe.prototype.once=function(n,t){function s(){this.off(n,s),t.apply(this,arguments)}return s.fn=t,this.on(n,s),this};Xe.prototype.off=Xe.prototype.removeListener=Xe.prototype.removeAllListeners=Xe.prototype.removeEventListener=function(n,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var s=this._callbacks["$"+n];if(!s)return this;if(arguments.length==1)return delete this._callbacks["$"+n],this;for(var o,a=0;aPromise.resolve().then(t):(t,s)=>s(t,0),Kt=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),mk="arraybuffer";function Zy(n,...t){return t.reduce((s,o)=>(n.hasOwnProperty(o)&&(s[o]=n[o]),s),{})}const gk=Kt.setTimeout,yk=Kt.clearTimeout;function Ja(n,t){t.useNativeTimers?(n.setTimeoutFn=gk.bind(Kt),n.clearTimeoutFn=yk.bind(Kt)):(n.setTimeoutFn=Kt.setTimeout.bind(Kt),n.clearTimeoutFn=Kt.clearTimeout.bind(Kt))}const vk=1.33;function wk(n){return typeof n=="string"?xk(n):Math.ceil((n.byteLength||n.size)*vk)}function xk(n){let t=0,s=0;for(let o=0,a=n.length;o=57344?s+=3:(o++,s+=4);return s}function ev(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Sk(n){let t="";for(let s in n)n.hasOwnProperty(s)&&(t.length&&(t+="&"),t+=encodeURIComponent(s)+"="+encodeURIComponent(n[s]));return t}function Ek(n){let t={},s=n.split("&");for(let o=0,a=s.length;o{this.readyState="paused",t()};if(this._polling||!this.writable){let o=0;this._polling&&(o++,this.once("pollComplete",function(){--o||s()})),this.writable||(o++,this.once("drain",function(){--o||s()}))}else s()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const s=o=>{if(this.readyState==="opening"&&o.type==="open"&&this.onOpen(),o.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(o)};dk(t,this.socket.binaryType).forEach(s),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,ck(t,s=>{this.doWrite(s,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",s=this.query||{};return this.opts.timestampRequests!==!1&&(s[this.opts.timestampParam]=ev()),!this.supportsBinary&&!s.sid&&(s.b64=1),this.createUri(t,s)}}let tv=!1;try{tv=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const kk=tv;function Ck(){}class Rk extends _k{constructor(t){if(super(t),typeof location<"u"){const s=location.protocol==="https:";let o=location.port;o||(o=s?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||o!==t.port}}doWrite(t,s){const o=this.request({method:"POST",data:t});o.on("success",s),o.on("error",(a,u)=>{this.onError("xhr post error",a,u)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(s,o)=>{this.onError("xhr poll error",s,o)}),this.pollXhr=t}}class xn extends Xe{constructor(t,s,o){super(),this.createRequest=t,Ja(this,o),this._opts=o,this._method=o.method||"GET",this._uri=s,this._data=o.data!==void 0?o.data:null,this._create()}_create(){var t;const s=Zy(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");s.xdomain=!!this._opts.xd;const o=this._xhr=this.createRequest(s);try{o.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){o.setDisableHeaderCheck&&o.setDisableHeaderCheck(!0);for(let a in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(a)&&o.setRequestHeader(a,this._opts.extraHeaders[a])}}catch{}if(this._method==="POST")try{o.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{o.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(o),"withCredentials"in o&&(o.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(o.timeout=this._opts.requestTimeout),o.onreadystatechange=()=>{var a;o.readyState===3&&((a=this._opts.cookieJar)===null||a===void 0||a.parseCookies(o.getResponseHeader("set-cookie"))),o.readyState===4&&(o.status===200||o.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof o.status=="number"?o.status:0)},0))},o.send(this._data)}catch(a){this.setTimeoutFn(()=>{this._onError(a)},0);return}typeof document<"u"&&(this._index=xn.requestsCount++,xn.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=Ck,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete xn.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}xn.requestsCount=0;xn.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",jm);else if(typeof addEventListener=="function"){const n="onpagehide"in Kt?"pagehide":"unload";addEventListener(n,jm,!1)}}function jm(){for(let n in xn.requests)xn.requests.hasOwnProperty(n)&&xn.requests[n].abort()}const Tk=(function(){const n=nv({xdomain:!1});return n&&n.responseType!==null})();class Ak extends Rk{constructor(t){super(t);const s=t&&t.forceBase64;this.supportsBinary=Tk&&!s}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new xn(nv,this.uri(),t)}}function nv(n){const t=n.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||kk))return new XMLHttpRequest}catch{}if(!t)try{return new Kt[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const rv=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Pk extends wd{get name(){return"websocket"}doOpen(){const t=this.uri(),s=this.opts.protocols,o=rv?{}:Zy(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(o.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,s,o)}catch(a){return this.emitReserved("error",a)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let s=0;s{try{this.doWrite(o,u)}catch{}a&&Ya(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",s=this.query||{};return this.opts.timestampRequests&&(s[this.opts.timestampParam]=ev()),this.supportsBinary||(s.b64=1),this.createUri(t,s)}}const lc=Kt.WebSocket||Kt.MozWebSocket;class Nk extends Pk{createSocket(t,s,o){return rv?new lc(t,s,o):s?new lc(t,s):new lc(t)}doWrite(t,s){this.ws.send(s)}}class Ok extends wd{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const s=hk(Number.MAX_SAFE_INTEGER,this.socket.binaryType),o=t.readable.pipeThrough(s).getReader(),a=fk();a.readable.pipeTo(t.writable),this._writer=a.writable.getWriter();const u=()=>{o.read().then(({done:h,value:p})=>{h||(this.onPacket(p),u())}).catch(h=>{})};u();const d={type:"open"};this.query.sid&&(d.data=`{"sid":"${this.query.sid}"}`),this._writer.write(d).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let s=0;s{a&&Ya(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const Lk={websocket:Nk,webtransport:Ok,polling:Ak},Ik=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Fk=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Uc(n){if(n.length>8e3)throw"URI too long";const t=n,s=n.indexOf("["),o=n.indexOf("]");s!=-1&&o!=-1&&(n=n.substring(0,s)+n.substring(s,o).replace(/:/g,";")+n.substring(o,n.length));let a=Ik.exec(n||""),u={},d=14;for(;d--;)u[Fk[d]]=a[d]||"";return s!=-1&&o!=-1&&(u.source=t,u.host=u.host.substring(1,u.host.length-1).replace(/;/g,":"),u.authority=u.authority.replace("[","").replace("]","").replace(/;/g,":"),u.ipv6uri=!0),u.pathNames=jk(u,u.path),u.queryKey=Dk(u,u.query),u}function jk(n,t){const s=/\/{2,9}/g,o=t.replace(s,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&o.splice(0,1),t.slice(-1)=="/"&&o.splice(o.length-1,1),o}function Dk(n,t){const s={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(o,a,u){a&&(s[a]=u)}),s}const zc=typeof addEventListener=="function"&&typeof removeEventListener=="function",Ma=[];zc&&addEventListener("offline",()=>{Ma.forEach(n=>n())},!1);class wr extends Xe{constructor(t,s){if(super(),this.binaryType=mk,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(s=t,t=null),t){const o=Uc(t);s.hostname=o.host,s.secure=o.protocol==="https"||o.protocol==="wss",s.port=o.port,o.query&&(s.query=o.query)}else s.host&&(s.hostname=Uc(s.host).host);Ja(this,s),this.secure=s.secure!=null?s.secure:typeof location<"u"&&location.protocol==="https:",s.hostname&&!s.port&&(s.port=this.secure?"443":"80"),this.hostname=s.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=s.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},s.transports.forEach(o=>{const a=o.prototype.name;this.transports.push(a),this._transportsByName[a]=o}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},s),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=Ek(this.opts.query)),zc&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Ma.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const s=Object.assign({},this.opts.query);s.EIO=Jy,s.transport=t,this.id&&(s.sid=this.id);const o=Object.assign({},this.opts,{query:s,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](o)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&wr.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const s=this.createTransport(t);s.open(),this.setTransport(s)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",s=>this._onClose("transport close",s))}onOpen(){this.readyState="open",wr.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const s=new Error("server error");s.code=t.data,this._onError(s);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let s=1;for(let o=0;o0&&s>this._maxPayload)return this.writeBuffer.slice(0,o);s+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,Ya(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,s,o){return this._sendPacket("message",t,s,o),this}send(t,s,o){return this._sendPacket("message",t,s,o),this}_sendPacket(t,s,o,a){if(typeof s=="function"&&(a=s,s=void 0),typeof o=="function"&&(a=o,o=null),this.readyState==="closing"||this.readyState==="closed")return;o=o||{},o.compress=o.compress!==!1;const u={type:t,data:s,options:o};this.emitReserved("packetCreate",u),this.writeBuffer.push(u),a&&this.once("flush",a),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},s=()=>{this.off("upgrade",s),this.off("upgradeError",s),t()},o=()=>{this.once("upgrade",s),this.once("upgradeError",s)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?o():t()}):this.upgrading?o():t()),this}_onError(t){if(wr.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,s){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),zc&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const o=Ma.indexOf(this._offlineEventListener);o!==-1&&Ma.splice(o,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,s),this.writeBuffer=[],this._prevBufferLen=0}}}wr.protocol=Jy;class Mk extends wr{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t{o||(s.send([{type:"ping",data:"probe"}]),s.once("packet",v=>{if(!o)if(v.type==="pong"&&v.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",s),!s)return;wr.priorWebsocketSuccess=s.name==="websocket",this.transport.pause(()=>{o||this.readyState!=="closed"&&(y(),this.setTransport(s),s.send([{type:"upgrade"}]),this.emitReserved("upgrade",s),s=null,this.upgrading=!1,this.flush())})}else{const k=new Error("probe error");k.transport=s.name,this.emitReserved("upgradeError",k)}}))};function u(){o||(o=!0,y(),s.close(),s=null)}const d=v=>{const k=new Error("probe error: "+v);k.transport=s.name,u(),this.emitReserved("upgradeError",k)};function h(){d("transport closed")}function p(){d("socket closed")}function m(v){s&&v.name!==s.name&&u()}const y=()=>{s.removeListener("open",a),s.removeListener("error",d),s.removeListener("close",h),this.off("close",p),this.off("upgrading",m)};s.once("open",a),s.once("error",d),s.once("close",h),this.once("close",p),this.once("upgrading",m),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{o||s.open()},200):s.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const s=[];for(let o=0;oLk[u]).filter(u=>!!u)),super(o?a:t,a)}};function zk(n,t="",s){let o=n;s=s||typeof location<"u"&&location,n==null&&(n=s.protocol+"//"+s.host),typeof n=="string"&&(n.charAt(0)==="/"&&(n.charAt(1)==="/"?n=s.protocol+n:n=s.host+n),/^(https?|wss?):\/\//.test(n)||(typeof s<"u"?n=s.protocol+"//"+n:n="https://"+n),o=Uc(n)),o.port||(/^(http|ws)$/.test(o.protocol)?o.port="80":/^(http|ws)s$/.test(o.protocol)&&(o.port="443")),o.path=o.path||"/";const u=o.host.indexOf(":")!==-1?"["+o.host+"]":o.host;return o.id=o.protocol+"://"+u+":"+o.port+t,o.href=o.protocol+"://"+u+(s&&s.port===o.port?"":":"+o.port),o}const Bk=typeof ArrayBuffer=="function",$k=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n.buffer instanceof ArrayBuffer,sv=Object.prototype.toString,Hk=typeof Blob=="function"||typeof Blob<"u"&&sv.call(Blob)==="[object BlobConstructor]",Vk=typeof File=="function"||typeof File<"u"&&sv.call(File)==="[object FileConstructor]";function xd(n){return Bk&&(n instanceof ArrayBuffer||$k(n))||Hk&&n instanceof Blob||Vk&&n instanceof File}function Ua(n,t){if(!n||typeof n!="object")return!1;if(Array.isArray(n)){for(let s=0,o=n.length;s=0&&n.numthis.opts.maxAttachments)throw new Error("too many attachments");o.attachments=h}if(t.charAt(s+1)==="/"){const u=s+1;for(;++s&&!(t.charAt(s)===","||s===t.length););o.nsp=t.substring(u,s)}else o.nsp="/";const a=t.charAt(s+1);if(a!==""&&Number(a)==a){const u=s+1;for(;++s;){const d=t.charAt(s);if(d==null||Number(d)!=d){--s;break}if(s===t.length)break}o.id=Number(t.substring(u,s+1))}if(t.charAt(++s)){const u=this.tryParse(t.substr(s));if(Sd.isPayloadValid(o.type,u))o.data=u;else throw new Error("invalid payload")}return o}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch{return!1}}static isPayloadValid(t,s){switch(t){case Ne.CONNECT:return Dm(s);case Ne.DISCONNECT:return s===void 0;case Ne.CONNECT_ERROR:return typeof s=="string"||Dm(s);case Ne.EVENT:case Ne.BINARY_EVENT:return Array.isArray(s)&&(typeof s[0]=="number"||typeof s[0]=="string"&&Qk.indexOf(s[0])===-1);case Ne.ACK:case Ne.BINARY_ACK:return Array.isArray(s)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Gk{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const s=qk(this.reconPack,this.buffers);return this.finishedReconstruction(),s}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Xk=Number.isInteger||function(n){return typeof n=="number"&&isFinite(n)&&Math.floor(n)===n};function Dm(n){return Object.prototype.toString.call(n)==="[object Object]"}const Yk=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Sd,Encoder:Kk,get PacketType(){return Ne}},Symbol.toStringTag,{value:"Module"}));function ln(n,t,s){return n.on(t,s),function(){n.off(t,s)}}const Jk=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class ov extends Xe{constructor(t,s,o){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=s,o&&o.auth&&(this.auth=o.auth),this._opts=Object.assign({},o),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[ln(t,"open",this.onopen.bind(this)),ln(t,"packet",this.onpacket.bind(this)),ln(t,"error",this.onerror.bind(this)),ln(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...s){var o,a,u;if(Jk.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(s.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(s),this;const d={type:Ne.EVENT,data:s};if(d.options={},d.options.compress=this.flags.compress!==!1,typeof s[s.length-1]=="function"){const y=this.ids++,v=s.pop();this._registerAckCallback(y,v),d.id=y}const h=(a=(o=this.io.engine)===null||o===void 0?void 0:o.transport)===null||a===void 0?void 0:a.writable,p=this.connected&&!(!((u=this.io.engine)===null||u===void 0)&&u._hasPingExpired());return this.flags.volatile&&!h||(p?(this.notifyOutgoingListeners(d),this.packet(d)):this.sendBuffer.push(d)),this.flags={},this}_registerAckCallback(t,s){var o;const a=(o=this.flags.timeout)!==null&&o!==void 0?o:this._opts.ackTimeout;if(a===void 0){this.acks[t]=s;return}const u=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let h=0;h{this.io.clearTimeoutFn(u),s.apply(this,h)};d.withError=!0,this.acks[t]=d}emitWithAck(t,...s){return new Promise((o,a)=>{const u=(d,h)=>d?a(d):o(h);u.withError=!0,s.push(u),this.emit(t,...s)})}_addToQueue(t){let s;typeof t[t.length-1]=="function"&&(s=t.pop());const o={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((a,...u)=>(this._queue[0],a!==null?o.tryCount>this._opts.retries&&(this._queue.shift(),s&&s(a)):(this._queue.shift(),s&&s(null,...u)),o.pending=!1,this._drainQueue())),this._queue.push(o),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const s=this._queue[0];s.pending&&!t||(s.pending=!0,s.tryCount++,this.flags=s.flags,this.emit.apply(this,s.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:Ne.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,s){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,s),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(o=>String(o.id)===t)){const o=this.acks[t];delete this.acks[t],o.withError&&o.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case Ne.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Ne.EVENT:case Ne.BINARY_EVENT:this.onevent(t);break;case Ne.ACK:case Ne.BINARY_ACK:this.onack(t);break;case Ne.DISCONNECT:this.ondisconnect();break;case Ne.CONNECT_ERROR:this.destroy();const o=new Error(t.data.message);o.data=t.data.data,this.emitReserved("connect_error",o);break}}onevent(t){const s=t.data||[];t.id!=null&&s.push(this.ack(t.id)),this.connected?this.emitEvent(s):this.receiveBuffer.push(Object.freeze(s))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const s=this._anyListeners.slice();for(const o of s)o.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const s=this;let o=!1;return function(...a){o||(o=!0,s.packet({type:Ne.ACK,id:t,data:a}))}}onack(t){const s=this.acks[t.id];typeof s=="function"&&(delete this.acks[t.id],s.withError&&t.data.unshift(null),s.apply(this,t.data))}onconnect(t,s){this.id=t,this.recovered=s&&this._pid===s,this._pid=s,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Ne.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const s=this._anyListeners;for(let o=0;o0&&n.jitter<=1?n.jitter:0,this.attempts=0}Gs.prototype.duration=function(){var n=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),s=Math.floor(t*this.jitter*n);n=(Math.floor(t*10)&1)==0?n-s:n+s}return Math.min(n,this.max)|0};Gs.prototype.reset=function(){this.attempts=0};Gs.prototype.setMin=function(n){this.ms=n};Gs.prototype.setMax=function(n){this.max=n};Gs.prototype.setJitter=function(n){this.jitter=n};class Hc extends Xe{constructor(t,s){var o;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(s=t,t=void 0),s=s||{},s.path=s.path||"/socket.io",this.opts=s,Ja(this,s),this.reconnection(s.reconnection!==!1),this.reconnectionAttempts(s.reconnectionAttempts||1/0),this.reconnectionDelay(s.reconnectionDelay||1e3),this.reconnectionDelayMax(s.reconnectionDelayMax||5e3),this.randomizationFactor((o=s.randomizationFactor)!==null&&o!==void 0?o:.5),this.backoff=new Gs({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(s.timeout==null?2e4:s.timeout),this._readyState="closed",this.uri=t;const a=s.parser||Yk;this.encoder=new a.Encoder,this.decoder=new a.Decoder,this._autoConnect=s.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var s;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(s=this.backoff)===null||s===void 0||s.setMin(t),this)}randomizationFactor(t){var s;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(s=this.backoff)===null||s===void 0||s.setJitter(t),this)}reconnectionDelayMax(t){var s;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(s=this.backoff)===null||s===void 0||s.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Uk(this.uri,this.opts);const s=this.engine,o=this;this._readyState="opening",this.skipReconnect=!1;const a=ln(s,"open",function(){o.onopen(),t&&t()}),u=h=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",h),t?t(h):this.maybeReconnectOnOpen()},d=ln(s,"error",u);if(this._timeout!==!1){const h=this._timeout,p=this.setTimeoutFn(()=>{a(),u(new Error("timeout")),s.close()},h);this.opts.autoUnref&&p.unref(),this.subs.push(()=>{this.clearTimeoutFn(p)})}return this.subs.push(a),this.subs.push(d),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(ln(t,"ping",this.onping.bind(this)),ln(t,"data",this.ondata.bind(this)),ln(t,"error",this.onerror.bind(this)),ln(t,"close",this.onclose.bind(this)),ln(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(s){this.onclose("parse error",s)}}ondecoded(t){Ya(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,s){let o=this.nsps[t];return o?this._autoConnect&&!o.active&&o.connect():(o=new ov(this,t,s),this.nsps[t]=o),o}_destroy(t){const s=Object.keys(this.nsps);for(const o of s)if(this.nsps[o].active)return;this._close()}_packet(t){const s=this.encoder.encode(t);for(let o=0;ot()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,s){var o;this.cleanup(),(o=this.engine)===null||o===void 0||o.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,s),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const s=this.backoff.duration();this._reconnecting=!0;const o=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(a=>{a?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",a)):t.onreconnect()}))},s);this.opts.autoUnref&&o.unref(),this.subs.push(()=>{this.clearTimeoutFn(o)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Uo={};function za(n,t){typeof n=="object"&&(t=n,n=void 0),t=t||{};const s=zk(n,t.path||"/socket.io"),o=s.source,a=s.id,u=s.path,d=Uo[a]&&u in Uo[a].nsps,h=t.forceNew||t["force new connection"]||t.multiplex===!1||d;let p;return h?p=new Hc(o,t):(Uo[a]||(Uo[a]=new Hc(o,t)),p=Uo[a]),s.query&&!t.query&&(t.query=s.queryKey),p.socket(s.path,t)}Object.assign(za,{Manager:Hc,Socket:ov,io:za,connect:za});const Zk=250;function Mm(n,t){var s;const o=(s=n.token)!==null&&s!==void 0?s:Gr(),a={app_id:n.appId,token:o};o||(a.anonymous_id=gd());const u=za(n.serverUrl,{path:n.mountPath,transports:n.transports,query:a});return u.on("connect",async()=>{var d;return console.log("connect",u.id),(d=t.connect)===null||d===void 0?void 0:d.call(t)}),u.on("update_model",async d=>{var h;return(h=t.update_model)===null||h===void 0?void 0:h.call(t,d)}),u.on("error",async d=>{var h;return(h=t.error)===null||h===void 0?void 0:h.call(t,d)}),u.on("connect_error",async d=>{var h;return console.error("connect_error",d),(h=t.error)===null||h===void 0?void 0:h.call(t,d)}),u}function eC({config:n}){let t={...n};const s={},o={},a={connect:async()=>{const E=[];Object.keys(s).forEach(I=>{const A=k(I);A.length!==0&&(m(I),A.forEach(({connect:O})=>{const H=async()=>O==null?void 0:O();E.push(H())}))}),await Promise.all(E)},update_model:async E=>{const A=k(E.room).map(O=>{var H;return(H=O.update_model)===null||H===void 0?void 0:H.call(O,E)});await Promise.all(A)},error:async E=>{console.error("error",E);const I=Object.values(s).flat().map(A=>{var O;return(O=A.error)===null||O===void 0?void 0:O.call(A,E)});await Promise.all(I)}};let u=Mm(n,a);function d(){h()}function h(){M(),u&&u.disconnect()}function p(E){d(),t={...t,...E},u=Mm(t,a)}function m(E){u.emit("join",E)}function y(E){u.emit("leave",E)}async function v(E,I){var A;const O=JSON.stringify(I);return(A=a.update_model)===null||A===void 0?void 0:A.call(a,{room:E,data:O})}function k(E){var I;return(I=s[E])!==null&&I!==void 0?I:[]}function L(E){const I=o[E];I&&(clearTimeout(I),delete o[E])}function M(){Object.keys(o).forEach(E=>{var I,A;clearTimeout(o[E]),delete o[E],((A=(I=s[E])===null||I===void 0?void 0:I.length)!==null&&A!==void 0?A:0)===0&&delete s[E]})}function _(E){L(E),o[E]=setTimeout(()=>{var I,A;delete o[E],!(((A=(I=s[E])===null||I===void 0?void 0:I.length)!==null&&A!==void 0?A:0)>0)&&(y(E),delete s[E])},Zk)}return{socket:u,subscribeToRoom:(E,I)=>{s[E]?L(E):(m(E),s[E]=[]),s[E].push(I);let A=!1;return()=>{var O,H;A||(A=!0,s[E]=(H=(O=s[E])===null||O===void 0?void 0:O.filter($=>$!==I))!==null&&H!==void 0?H:[],s[E].length===0&&_(E))}},updateConfig:p,updateModel:v,disconnect:h}}(!globalThis.EventTarget||!globalThis.Event)&&console.error(` PartySocket requires a global 'EventTarget' class to be available! You can polyfill this global by adding this to your code before any partysocket imports: \`\`\` import 'partysocket/event-target-polyfill'; \`\`\` Please file an issue at https://github.com/partykit/partykit if you're still having trouble. `);var iv=class extends Event{constructor(t,s){super("error",s);Ie(this,"message");Ie(this,"error");this.message=t.message,this.error=t}},av=class extends Event{constructor(t=1e3,s="",o){super("close",o);Ie(this,"code");Ie(this,"reason");Ie(this,"wasClean",!0);this.code=t,this.reason=s}},uc={Event,ErrorEvent:iv,CloseEvent:av};function tC(n,t){if(!n)throw new Error(t)}function nC(n){return new n.constructor(n.type,n)}function rC(n){return"data"in n?new MessageEvent(n.type,n):"code"in n||"reason"in n?new av(n.code||1999,n.reason||"unknown reason",n):"error"in n?new iv(n.error,n):new Event(n.type,n)}var Zm,sC=typeof process<"u"&&typeof((Zm=process.versions)==null?void 0:Zm.node)<"u"&&typeof document>"u",Na=sC?rC:nC,Fr={maxReconnectionDelay:1e4,minReconnectionDelay:1e3+Math.random()*4e3,minUptime:5e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:4e3,maxRetries:1/0,maxEnqueuedMessages:1/0},Um=!1,oC=class jr extends EventTarget{constructor(s,o,a={}){super();Ie(this,"_ws");Ie(this,"_retryCount",-1);Ie(this,"_uptimeTimeout");Ie(this,"_connectTimeout");Ie(this,"_shouldReconnect",!0);Ie(this,"_connectLock",!1);Ie(this,"_binaryType","blob");Ie(this,"_closeCalled",!1);Ie(this,"_messageQueue",[]);Ie(this,"_url");Ie(this,"_protocols");Ie(this,"_options");Ie(this,"onclose",null);Ie(this,"onerror",null);Ie(this,"onmessage",null);Ie(this,"onopen",null);Ie(this,"_handleOpen",s=>{this._debug("open event");const{minUptime:o=Fr.minUptime}=this._options;clearTimeout(this._connectTimeout),this._uptimeTimeout=setTimeout(()=>this._acceptOpen(),o),tC(this._ws,"WebSocket is not defined"),this._ws.binaryType=this._binaryType,this._messageQueue.forEach(a=>{var u;return(u=this._ws)==null?void 0:u.send(a)}),this._messageQueue=[],this.onopen&&this.onopen(s),this.dispatchEvent(Na(s))});Ie(this,"_handleMessage",s=>{this._debug("message event"),this.onmessage&&this.onmessage(s),this.dispatchEvent(Na(s))});Ie(this,"_handleError",s=>{this._debug("error event",s.message),this._disconnect(void 0,s.message==="TIMEOUT"?"timeout":void 0),this.onerror&&this.onerror(s),this._debug("exec error listeners"),this.dispatchEvent(Na(s)),this._connect()});Ie(this,"_handleClose",s=>{this._debug("close event"),this._clearTimeouts(),this._shouldReconnect&&this._connect(),this.onclose&&this.onclose(s),this.dispatchEvent(Na(s))});this._url=s,this._protocols=o,this._options=a,this._options.startClosed&&(this._shouldReconnect=!1),this._connect()}static get CONNECTING(){return 0}static get OPEN(){return 1}static get CLOSING(){return 2}static get CLOSED(){return 3}get CONNECTING(){return jr.CONNECTING}get OPEN(){return jr.OPEN}get CLOSING(){return jr.CLOSING}get CLOSED(){return jr.CLOSED}get binaryType(){return this._ws?this._ws.binaryType:this._binaryType}set binaryType(s){this._binaryType=s,this._ws&&(this._ws.binaryType=s)}get retryCount(){return Math.max(this._retryCount,0)}get bufferedAmount(){return this._messageQueue.reduce((o,a)=>(typeof a=="string"?o+=a.length:a instanceof Blob?o+=a.size:o+=a.byteLength,o),0)+(this._ws?this._ws.bufferedAmount:0)}get extensions(){return this._ws?this._ws.extensions:""}get protocol(){return this._ws?this._ws.protocol:""}get readyState(){return this._ws?this._ws.readyState:this._options.startClosed?jr.CLOSED:jr.CONNECTING}get url(){return this._ws?this._ws.url:""}get shouldReconnect(){return this._shouldReconnect}close(s=1e3,o){if(this._closeCalled=!0,this._shouldReconnect=!1,this._clearTimeouts(),!this._ws){this._debug("close enqueued: no ws instance");return}if(this._ws.readyState===this.CLOSED){this._debug("close: already closed");return}this._ws.close(s,o)}reconnect(s,o){this._shouldReconnect=!0,this._closeCalled=!1,this._retryCount=-1,!this._ws||this._ws.readyState===this.CLOSED?this._connect():(this._disconnect(s,o),this._connect())}send(s){if(this._ws&&this._ws.readyState===this.OPEN)this._debug("send",s),this._ws.send(s);else{const{maxEnqueuedMessages:o=Fr.maxEnqueuedMessages}=this._options;this._messageQueue.length",...s])}_getNextDelay(){const{reconnectionDelayGrowFactor:s=Fr.reconnectionDelayGrowFactor,minReconnectionDelay:o=Fr.minReconnectionDelay,maxReconnectionDelay:a=Fr.maxReconnectionDelay}=this._options;let u=0;return this._retryCount>0&&(u=o*Math.pow(s,this._retryCount-1),u>a&&(u=a)),this._debug("next delay",u),u}_wait(){return new Promise(s=>{setTimeout(s,this._getNextDelay())})}_getNextProtocols(s){if(!s)return Promise.resolve(null);if(typeof s=="string"||Array.isArray(s))return Promise.resolve(s);if(typeof s=="function"){const o=s();if(!o)return Promise.resolve(null);if(typeof o=="string"||Array.isArray(o))return Promise.resolve(o);if(o.then)return o}throw Error("Invalid protocols")}_getNextUrl(s){if(typeof s=="string")return Promise.resolve(s);if(typeof s=="function"){const o=s();if(typeof o=="string")return Promise.resolve(o);if(o.then)return o}throw Error("Invalid URL")}_connect(){if(this._connectLock||!this._shouldReconnect)return;this._connectLock=!0;const{maxRetries:s=Fr.maxRetries,connectionTimeout:o=Fr.connectionTimeout}=this._options;if(this._retryCount>=s){this._debug("max retries reached",this._retryCount,">=",s);return}this._retryCount++,this._debug("connect",this._retryCount),this._removeListeners(),this._wait().then(()=>Promise.all([this._getNextUrl(this._url),this._getNextProtocols(this._protocols||null)])).then(([a,u])=>{if(this._closeCalled){this._connectLock=!1;return}!this._options.WebSocket&&typeof WebSocket>"u"&&!Um&&(console.error(`‼️ No WebSocket implementation available. You should define options.WebSocket. For example, if you're using node.js, run \`npm install ws\`, and then in your code: import PartySocket from 'partysocket'; import WS from 'ws'; const partysocket = new PartySocket({ host: "127.0.0.1:1999", room: "test-room", WebSocket: WS }); `),Um=!0);const d=this._options.WebSocket||WebSocket;this._debug("connect",{url:a,protocols:u}),this._ws=u?new d(a,u):new d(a),this._ws.binaryType=this._binaryType,this._connectLock=!1,this._addListeners(),this._connectTimeout=setTimeout(()=>this._handleTimeout(),o)}).catch(a=>{this._connectLock=!1,this._handleError(new uc.ErrorEvent(Error(a.message),this))})}_handleTimeout(){this._debug("timeout event"),this._handleError(new uc.ErrorEvent(Error("TIMEOUT"),this))}_disconnect(s=1e3,o){if(this._clearTimeouts(),!!this._ws){this._removeListeners();try{this._ws.close(s,o),this._handleClose(new uc.CloseEvent(s,o,this))}catch{}}}_acceptOpen(){this._debug("accept open"),this._retryCount=0}_removeListeners(){this._ws&&(this._debug("removeListeners"),this._ws.removeEventListener("open",this._handleOpen),this._ws.removeEventListener("close",this._handleClose),this._ws.removeEventListener("message",this._handleMessage),this._ws.removeEventListener("error",this._handleError))}_addListeners(){this._ws&&(this._debug("addListeners"),this._ws.addEventListener("open",this._handleOpen),this._ws.addEventListener("close",this._handleClose),this._ws.addEventListener("message",this._handleMessage),this._ws.addEventListener("error",this._handleError))}_clearTimeouts(){clearTimeout(this._connectTimeout),clearTimeout(this._uptimeTimeout)}};/*! * Reconnecting WebSocket * by Pedro Ladaria * https://github.com/pladaria/reconnecting-websocket * License MIT */var iC=n=>n[1]!==null&&n[1]!==void 0;function aC(){if(typeof crypto<"u"&&crypto.randomUUID)return crypto.randomUUID();let n=new Date().getTime(),t=typeof performance<"u"&&performance.now&&performance.now()*1e3||0;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(s){let o=Math.random()*16;return n>0?(o=(n+o)%16|0,n=Math.floor(n/16)):(o=(t+o)%16|0,t=Math.floor(t/16)),(s==="x"?o:o&3|8).toString(16)})}function lv(n,t,s={}){const{host:o,path:a,protocol:u,room:d,party:h,query:p}=n;let m=o.replace(/^(http|https|ws|wss):\/\//,"");if(m.endsWith("/")&&(m=m.slice(0,-1)),a&&a.startsWith("/"))throw new Error("path must not start with a slash");const y=h??"main",v=a?`/${a}`:"",k=u||(m.startsWith("localhost:")||m.startsWith("127.0.0.1:")||m.startsWith("192.168.")||m.startsWith("10.")||m.startsWith("172.")&&m.split(".")[1]>="16"&&m.split(".")[1]<="31"||m.startsWith("[::ffff:7f00:1]:")?t:t+"s"),L=`${k}://${m}/${h?`parties/${h}`:"party"}/${d}${v}`,M=(x={})=>`${L}?${new URLSearchParams([...Object.entries(s),...Object.entries(x).filter(iC)])}`,_=typeof p=="function"?async()=>M(await p()):M(p);return{host:m,path:v,room:d,name:y,protocol:k,partyUrl:L,urlProvider:_}}var lC=class extends oC{constructor(t){const s=zm(t);super(s.urlProvider,s.protocols,s.socketOptions);Ie(this,"_pk");Ie(this,"_pkurl");Ie(this,"name");Ie(this,"room");Ie(this,"host");Ie(this,"path");this.partySocketOptions=t,this.setWSProperties(s)}updateProperties(t){const s=zm({...t,host:t.host??this.host,room:t.room??this.room,path:t.path??this.path});this._url=s.urlProvider,this._protocols=s.protocols,this._options=s.socketOptions,this.setWSProperties(s)}setWSProperties(t){const{_pk:s,_pkurl:o,name:a,room:u,host:d,path:h}=t;this._pk=s,this._pkurl=o,this.name=a,this.room=u,this.host=d,this.path=h}reconnect(t,s){if(!this.room||!this.host)throw new Error("The room and host must be set before connecting, use `updateProperties` method to set them or pass them to the constructor.");super.reconnect(t,s)}get id(){return this._pk}get roomUrl(){return this._pkurl}static async fetch(t,s){const o=lv(t,"http"),a=typeof o.urlProvider=="string"?o.urlProvider:await o.urlProvider();return(t.fetch??fetch)(a,s)}};function zm(n){const{id:t,host:s,path:o,party:a,room:u,protocol:d,query:h,protocols:p,...m}=n,y=t||aC(),v=lv(n,"ws",{_pk:y});return{_pk:y,_pkurl:v.partyUrl,name:v.name,room:v.room,host:v.host,path:v.path,protocols:p,socketOptions:m,urlProvider:v.urlProvider}}const uC=1e3,cC=3e3;class dC{constructor(t,s,o,a,u){var d;this.onClose=u,this.listeners=new Set,this.heartbeat=null,this.id=(d=a==null?void 0:a.id)!==null&&d!==void 0?d:crypto.randomUUID();const h=new lC({host:o.host,party:t,room:s,id:this.id,query:()=>{const y=o.getAuthToken();return{app_id:o.appId,handler:t,...y?{token:y}:{},...o.functionsVersion?{fv:o.functionsVersion}:{}}}});this.ws=h;let p=Date.now();const m=()=>{p=Date.now()};h.addEventListener("open",m),h.addEventListener("message",y=>{m();let v;try{v=JSON.parse(y.data)}catch{return}if((v&&typeof v=="object"?v.type:void 0)!=="__pong")for(const L of this.listeners)L(v)}),this.heartbeat=setInterval(()=>{if(Date.now()-p>cC){m(),h.reconnect();return}try{h.send(JSON.stringify({type:"__ping"}))}catch{}},uC)}subscribe(t){return this.listeners.add(t),{unsubscribe:()=>{this.listeners.delete(t)}}}send(t){this.ws.send(JSON.stringify(t))}close(){this.heartbeat&&(clearInterval(this.heartbeat),this.heartbeat=null),this.listeners.clear(),this.ws.close(),this.onClose()}}function fC(n,t,s,o){let a=null;return{connect(u){if(a)return a;const d=new dC(n,t,s,u,()=>{o.delete(d),a===d&&(a=null)});return a=d,o.add(d),d}}}function hC(n,t){return n&&!n.startsWith("/")?n:t??n}function pC(n){const t=new Set;return{module:new Proxy({},{get(o,a){if(!(typeof a!="string"||a==="then"))return u=>fC(a,u,n,t)}}),closeAll:()=>{for(const o of[...t])o.close()}}}function mC(n){var t,s,o;const{serverUrl:a="https://base44.app",appId:u,token:d,serviceToken:h,requiresAuth:p=!1,appBaseUrl:m,options:y,functionsVersion:v,headers:k}=n,L=typeof m=="string"?m:"",M={serverUrl:a,mountPath:"/ws-user-apps/socket.io/",transports:["websocket"],appId:u,token:d};let _=null;const x=()=>(_||(_=eC({config:M})),_),E={...k,"X-App-Id":String(u)},I=v?{...E,"Base44-Functions-Version":v}:E,A=$o({baseURL:`${a}/api`,headers:E,token:d,onError:y==null?void 0:y.onError}),O=$o({baseURL:`${a}/api`,headers:I,token:d,interceptResponses:!1,onError:y==null?void 0:y.onError}),H={...E,...d?{"on-behalf-of":`Bearer ${d}`}:{}},$=$o({baseURL:`${a}/api`,headers:H,token:h,onError:y==null?void 0:y.onError}),G=$o({baseURL:`${a}/api`,headers:I,token:h,interceptResponses:!1}),B=ek(A,O,u,{appBaseUrl:L});if(typeof window<"u"){const xe=d||Gr();xe&&B.setToken(xe)}const ie=pC({appId:u,host:hC(a,typeof window<"u"?(t=window.location)===null||t===void 0?void 0:t.origin:void 0),functionsVersion:v,getAuthToken:()=>d||Gr()}),ue={entities:Rm({axios:A,appId:u,getSocket:x}),integrations:Tm(A,u),connectors:rk(A,u),auth:B,functions:Am(O,u,{getAuthHeaders:()=>{const xe={},J=d||Gr();return J&&(xe.Authorization=`Bearer ${J}`),xe},baseURL:(s=O.defaults)===null||s===void 0?void 0:s.baseURL}),agents:Pm({axios:A,getSocket:x,appId:u,serverUrl:a,token:d}),aiGateway:Nm({serverUrl:a,token:d,appId:u}),appLogs:Om(A,u),users:ok(A,u),analytics:z_({axiosClient:A,serverUrl:a,appId:u,userAuthModule:B}),actors:ie.module,cleanup:()=>{ue.analytics.cleanup(),ie.closeAll(),_&&_.disconnect()}},Se={entities:Rm({axios:$,appId:u,getSocket:x}),integrations:Tm($,u),sso:tk($,u),connectors:nk($,u),functions:Am(G,u,{getAuthHeaders:()=>{const xe={};return h&&(xe.Authorization=`Bearer ${h}`),xe},baseURL:(o=G.defaults)===null||o===void 0?void 0:o.baseURL}),agents:Pm({axios:$,getSocket:x,appId:u,serverUrl:a,token:d}),aiGateway:Nm({serverUrl:a,token:h,appId:u}),appLogs:Om($,u),cleanup:()=>{_&&_.disconnect()}};return p&&typeof window<"u"&&setTimeout(async()=>{try{await ue.auth.isAuthenticated()||ue.auth.redirectToLogin(window.location.href)}catch(xe){console.error("Authentication check failed:",xe),ue.auth.redirectToLogin(window.location.href)}},0),{...ue,setToken(xe){ue.auth.setToken(xe),_&&_.updateConfig({token:xe}),M.token=xe},getConfig(){return{serverUrl:a,appId:u,requiresAuth:p}},get asServiceRole(){if(!h)throw new Error("Service token is required to use asServiceRole. Please provide a serviceToken when creating the client.");return Se}}}const uv=typeof window>"u",gC=uv?{localStorage:new Map}:window,Qo=gC.localStorage,yC=n=>n.replace(/([A-Z])/g,"_$1").toLowerCase(),As=(n,{defaultValue:t=void 0,removeFromUrl:s=!1}={})=>{if(uv)return t;const o=`base44_${yC(n)}`,a=new URLSearchParams(window.location.search),u=a.get(n);if(s){a.delete(n);const h=`${window.location.pathname}${a.toString()?`?${a.toString()}`:""}${window.location.hash}`;window.history.replaceState({},document.title,h)}if(u)return Qo.setItem(o,u),u;if(t)return Qo.setItem(o,t),t;const d=Qo.getItem(o);return d||null},vC=()=>(As("clear_access_token")==="true"&&(Qo.removeItem("base44_access_token"),Qo.removeItem("token")),{appId:As("app_id",{defaultValue:"6a7dd9469e8f079d0357aa92"}),token:As("access_token",{removeFromUrl:!0}),fromUrl:As("from_url",{defaultValue:window.location.href}),functionsVersion:As("functions_version",{defaultValue:"prod"}),appBaseUrl:As("app_base_url",{defaultValue:void 0})}),Vo={...vC()},{appId:wC,token:xC,functionsVersion:SC,appBaseUrl:EC}=Vo,Wo=mC({appId:wC,token:xC,functionsVersion:SC,serverUrl:"",requiresAuth:!1,appBaseUrl:EC});function bC({}){var a;const t=qs().pathname.substring(1),{data:s,isFetched:o}=bS({queryKey:["user"],queryFn:async()=>{try{return{user:await Wo.auth.me(),isAuthenticated:!0}}catch{return{user:null,isAuthenticated:!1}}}});return w.jsx("div",{className:"min-h-screen flex items-center justify-center p-6 bg-slate-50",children:w.jsx("div",{className:"max-w-md w-full",children:w.jsxs("div",{className:"text-center space-y-6",children:[w.jsxs("div",{className:"space-y-2",children:[w.jsx("h1",{className:"text-7xl font-light text-slate-300",children:"404"}),w.jsx("div",{className:"h-0.5 w-16 bg-slate-200 mx-auto"})]}),w.jsxs("div",{className:"space-y-3",children:[w.jsx("h2",{className:"text-2xl font-medium text-slate-800",children:"Page Not Found"}),w.jsxs("p",{className:"text-slate-600 leading-relaxed",children:["The page ",w.jsxs("span",{className:"font-medium text-slate-700",children:['"',t,'"']})," could not be found in this application."]})]}),o&&s.isAuthenticated&&((a=s.user)==null?void 0:a.role)==="admin"&&w.jsx("div",{className:"mt-8 p-4 bg-slate-100 rounded-lg border border-slate-200",children:w.jsxs("div",{className:"flex items-start space-x-3",children:[w.jsx("div",{className:"flex-shrink-0 w-5 h-5 rounded-full bg-orange-100 flex items-center justify-center mt-0.5",children:w.jsx("div",{className:"w-2 h-2 rounded-full bg-orange-400"})}),w.jsxs("div",{className:"text-left space-y-1",children:[w.jsx("p",{className:"text-sm font-medium text-slate-700",children:"Admin Note"}),w.jsx("p",{className:"text-sm text-slate-600 leading-relaxed",children:"This could mean that the AI hasn't implemented this page yet. Ask it to implement it in the chat."})]})]})}),w.jsx("div",{className:"pt-6",children:w.jsxs("button",{onClick:()=>window.location.href="/",className:"inline-flex items-center px-4 py-2 text-sm font-medium text-slate-700 bg-white border border-slate-200 rounded-lg hover:bg-slate-50 hover:border-slate-300 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-slate-500",children:[w.jsx("svg",{className:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:w.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})}),"Go Home"]})})]})})})}const cv=b.createContext(),_C=({children:n})=>{const[t,s]=b.useState(null),[o,a]=b.useState(!1),[u,d]=b.useState(!0),[h,p]=b.useState(!0),[m,y]=b.useState(null),[v,k]=b.useState(!1),[L,M]=b.useState(null);b.useEffect(()=>{_()},[]);const _=async()=>{var A,O;try{p(!0),y(null);const H=$o({baseURL:"/api/apps/public",headers:{"X-App-Id":Vo.appId},token:Vo.token,interceptResponses:!0});try{const $=await H.get(`/prod/public-settings/by-id/${Vo.appId}`);M($),Vo.token?await x():(d(!1),a(!1),k(!0)),p(!1)}catch($){if(console.error("App state check failed:",$),$.status===403&&((O=(A=$.data)==null?void 0:A.extra_data)!=null&&O.reason)){const G=$.data.extra_data.reason;y(G==="auth_required"?{type:"auth_required",message:"Authentication required"}:G==="user_not_registered"?{type:"user_not_registered",message:"User not registered for this app"}:{type:G,message:$.message})}else y({type:"unknown",message:$.message||"Failed to load app"});p(!1),d(!1)}}catch(H){console.error("Unexpected error:",H),y({type:"unknown",message:H.message||"An unexpected error occurred"}),p(!1),d(!1)}},x=async()=>{try{d(!0);const A=await Wo.auth.me();s(A),a(!0),d(!1),k(!0)}catch(A){console.error("User auth check failed:",A),d(!1),a(!1),k(!0),(A.status===401||A.status===403)&&y({type:"auth_required",message:"Authentication required"})}},E=(A=!0)=>{s(null),a(!1),A?Wo.auth.logout(window.location.href):Wo.auth.logout()},I=()=>{Wo.auth.redirectToLogin(window.location.href)};return w.jsx(cv.Provider,{value:{user:t,isAuthenticated:o,isLoadingAuth:u,isLoadingPublicSettings:h,authError:m,appPublicSettings:L,authChecked:v,logout:E,navigateToLogin:I,checkUserAuth:x,checkAppState:_},children:n})},kC=()=>{const n=b.useContext(cv);if(!n)throw new Error("useAuth must be used within an AuthProvider");return n},CC=()=>w.jsx("div",{className:"flex flex-col items-center justify-center min-h-screen bg-gradient-to-b from-white to-slate-50",children:w.jsx("div",{className:"max-w-md w-full p-8 bg-white rounded-lg shadow-lg border border-slate-100",children:w.jsxs("div",{className:"text-center",children:[w.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 mb-6 rounded-full bg-orange-100",children:w.jsx("svg",{className:"w-8 h-8 text-orange-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:w.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})}),w.jsx("h1",{className:"text-3xl font-bold text-slate-900 mb-4",children:"Access Restricted"}),w.jsx("p",{className:"text-slate-600 mb-8",children:"You are not registered to use this application. Please contact the app administrator to request access."}),w.jsxs("div",{className:"p-4 bg-slate-50 rounded-md text-sm text-slate-600",children:[w.jsx("p",{children:"If you believe this is an error, you can:"}),w.jsxs("ul",{className:"list-disc list-inside mt-2 space-y-1",children:[w.jsx("li",{children:"Verify you are logged in with the correct account"}),w.jsx("li",{children:"Contact the app administrator for access"}),w.jsx("li",{children:"Try logging out and back in again"})]})]})]})})}),RC=n=>{const t=n.slice(1);try{return decodeURIComponent(t)}catch{return t}};function TC(){const{pathname:n,hash:t}=qs(),s=eE();return b.useEffect(()=>{if(s!=="POP"){if(t){const o=RC(t),a=window.setTimeout(()=>{var u;(u=document.getElementById(o))==null||u.scrollIntoView({behavior:"smooth"})},50);return()=>window.clearTimeout(a)}window.scrollTo({top:0,left:0,behavior:"instant"})}},[n,t,s]),null}const Bm=[{label:"About",href:"/about"},{label:"Businesses",href:"/businesses"},{label:"Portfolio",href:"/portfolio"},{label:"Investor Relations",href:"/investor-relations"},{label:"Sustainability",href:"/sustainability"},{label:"News & Media",href:"/news-media",active:!0}];function AC(){const[n,t]=b.useState(!1),[s,o]=b.useState(!1);return b.useEffect(()=>{const a=()=>o(window.scrollY>8);return a(),window.addEventListener("scroll",a,{passive:!0}),()=>window.removeEventListener("scroll",a)},[]),w.jsxs("header",{className:"sticky top-0 z-50 bg-white",style:{borderBottom:"1px solid #E5E5E5",boxShadow:s?"0 1px 0 rgba(0,0,0,0.04)":"none",transition:"box-shadow 200ms ease-out"},children:[w.jsx("div",{className:"mx-auto w-full max-w-[1280px] px-5 sm:px-8",children:w.jsxs("div",{className:"flex h-[68px] lg:h-[84px] items-center justify-between gap-6",children:[w.jsxs(wn,{to:"/",className:"flex items-center gap-3 no-underline","aria-label":"Alrazah — Home",children:[w.jsx("span",{className:"inline-flex items-center justify-center w-9 h-9 lg:w-10 lg:h-10 text-white font-bold text-sm tracking-tight",style:{background:"#8D0034",letterSpacing:"-0.02em"},children:"A"}),w.jsxs("span",{className:"flex flex-col leading-none",children:[w.jsx("span",{className:"font-bold text-[15px] lg:text-[17px] tracking-[0.02em]",style:{color:"#1A1A1A"},children:"ALRAZAH"}),w.jsx("span",{className:"text-[9px] lg:text-[10px] font-medium tracking-[0.28em] mt-0.5",style:{color:"#8D0034"},children:"Q.P.S.C."})]})]}),w.jsx("nav",{className:"hidden lg:flex items-center gap-1","aria-label":"Primary",children:Bm.map(a=>w.jsx(wn,{to:a.href,className:"px-3.5 py-2 text-[13px] font-medium no-underline transition-colors duration-200",style:{color:a.active?"#8D0034":"#1A1A1A",borderBottom:a.active?"2px solid #8D0034":"2px solid transparent"},children:a.label},a.label))}),w.jsxs("div",{className:"hidden lg:flex items-center gap-2",children:[w.jsx("button",{"aria-label":"Search",className:"inline-flex items-center justify-center w-10 h-10 transition-colors duration-200",style:{color:"#1A1A1A"},children:w.jsx(Wx,{size:18,strokeWidth:1.75})}),w.jsx(wn,{to:"/contact",className:"no-underline inline-flex items-center px-5 py-2.5 text-[13px] font-semibold text-white transition-colors duration-200",style:{background:"#8D0034"},children:"Contact"})]}),w.jsx("button",{className:"lg:hidden inline-flex items-center justify-center w-10 h-10","aria-label":n?"Close menu":"Open menu","aria-expanded":n,onClick:()=>t(a=>!a),style:{color:"#1A1A1A"},children:n?w.jsx(Zc,{size:22}):w.jsx(Bx,{size:22})})]})}),n&&w.jsx("div",{className:"lg:hidden border-t",style:{borderColor:"#E5E5E5",background:"#FFFFFF"},children:w.jsxs("nav",{className:"px-5 py-4 flex flex-col gap-1","aria-label":"Mobile",children:[Bm.map(a=>w.jsx(wn,{to:a.href,onClick:()=>t(!1),className:"py-3 text-[15px] font-medium no-underline",style:{color:a.active?"#8D0034":"#1A1A1A"},children:a.label},a.label)),w.jsx(wn,{to:"/contact",onClick:()=>t(!1),className:"mt-2 inline-flex items-center justify-center px-5 py-3 text-[14px] font-semibold text-white no-underline",style:{background:"#8D0034"},children:"Contact"})]})})]})}function PC({trail:n,current:t}){return w.jsx("nav",{"aria-label":"Breadcrumb",className:"mx-auto w-full max-w-[1280px] px-5 sm:px-8",children:w.jsxs("ol",{className:"flex flex-wrap items-center gap-x-1.5 gap-y-1 py-[18px] lg:py-[22px]",style:{color:"#545454"},children:[n.map(s=>w.jsxs("li",{className:"flex items-center gap-1.5",children:[w.jsx(wn,{to:s.path,className:"text-[12px] lg:text-[13px] font-medium no-underline transition-colors duration-200",style:{color:"#545454"},onMouseEnter:o=>o.currentTarget.style.color="#8D0034",onMouseLeave:o=>o.currentTarget.style.color="#545454",children:s.label}),w.jsx(Og,{size:13,strokeWidth:2,style:{color:"#B0B0B0"}})]},s.label)),w.jsx("li",{"aria-current":"page",className:"text-[12px] lg:text-[13px] font-semibold truncate max-w-[260px] sm:max-w-[420px] lg:max-w-[640px]",style:{color:"#8D0034"},children:t})]})})}function NC({release:n}){return w.jsxs("section",{className:"alrazah-hero relative",style:{background:"#8D0034"},"aria-labelledby":"article-title",children:[w.jsx("div",{className:"absolute inset-0 pointer-events-none",style:{background:"linear-gradient(180deg, rgba(0,0,0,0.08) 0%, rgba(0,0,0,0) 40%, rgba(0,0,0,0.12) 100%)"}}),w.jsx("div",{className:"relative mx-auto w-full max-w-[1280px] px-5 sm:px-8 py-8 sm:py-10 lg:py-12",children:w.jsxs("div",{className:"max-w-[1000px]",children:[w.jsx("p",{className:"text-white font-bold uppercase tracking-[1.4px] text-[12px]",style:{marginBottom:"18px"},children:n.category}),w.jsx("h1",{id:"article-title",className:"text-white font-bold tracking-[-0.01em]",style:{fontSize:"clamp(30px, 4vw, 48px)",lineHeight:"1.08",maxWidth:"1050px"},children:n.title}),w.jsx("p",{className:"text-white",style:{fontSize:"14px",marginTop:"22px",opacity:.88},children:n.publicationDate}),w.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center gap-2 sm:gap-0 mt-5 text-white",style:{opacity:.9,fontSize:"12px",letterSpacing:"0.14em"},children:[w.jsx("span",{className:"font-semibold uppercase tracking-[0.14em]",children:n.heroMetadata.locationLine}),w.jsx("span",{className:"hidden sm:inline-block mx-4",style:{width:"1px",height:"12px",background:"rgba(255,255,255,0.45)"}}),w.jsx("span",{className:"font-semibold uppercase tracking-[0.14em]",children:n.heroMetadata.organizationLine})]})]})})]})}function OC({takeaways:n}){return w.jsxs("section",{className:"mx-auto w-full max-w-[1280px] px-5 sm:px-8 pt-12 lg:pt-16",children:[w.jsxs("div",{className:"max-w-[760px]",children:[w.jsx("p",{className:"font-bold uppercase tracking-[1.6px] text-[11px] lg:text-[12px]",style:{color:"#8D0034",marginBottom:"14px"},children:n.heading}),w.jsx("p",{className:"font-semibold text-[18px] lg:text-[19px] leading-[1.5]",style:{color:"#1A1A1A",marginBottom:"28px",maxWidth:"680px"},children:n.support})]}),w.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 border-t border-b",style:{borderColor:"#E5E5E5"},children:n.items.map((t,s)=>w.jsxs("div",{className:"px-5 lg:px-6 py-6 lg:py-7",style:{borderLeft:s===0?"none":"1px solid #E5E5E5",borderLeftColor:void 0,backgroundColor:s%2===1?"#F9F8F6":"#FFFFFF"},children:[w.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[w.jsx("span",{className:"font-bold text-[13px] tracking-[0.12em]",style:{color:"#8D0034"},children:t.index}),w.jsx("span",{className:"block h-px flex-1",style:{background:"rgba(141,0,52,0.25)"}})]}),w.jsx("p",{className:"font-semibold text-[14px] mb-2",style:{color:"#1A1A1A"},children:t.label}),w.jsx("p",{className:"text-[14px] leading-[1.6]",style:{color:"#545454"},children:t.body})]},t.index))})]})}function LC({factStrip:n}){return w.jsx("section",{className:"alrazah-facts mt-10 lg:mt-12 mx-auto w-full max-w-[1280px] px-5 sm:px-8","aria-label":n.heading,children:w.jsxs("div",{className:"max-w-[760px]",children:[w.jsx("p",{className:"font-bold uppercase tracking-[1.6px] text-[11px] lg:text-[12px] mb-5",style:{color:"#8D0034"},children:n.heading}),w.jsx("div",{className:"grid grid-cols-2 lg:grid-cols-4 border-t border-b",style:{borderColor:"#E5E5E5"},children:n.facts.map((t,s)=>w.jsxs("div",{className:"px-3 sm:px-4 py-6 lg:py-7",style:{borderLeft:s===0?"none":"1px solid #E5E5E5",backgroundColor:"#FFFFFF"},children:[w.jsx("span",{className:"block font-bold text-[11px] tracking-[0.14em] mb-3",style:{color:"#8D0034"},children:t.index}),w.jsx("p",{className:"font-bold leading-[1.08] tracking-[-0.01em]",style:{color:"#1A1A1A",fontSize:"clamp(22px, 2.4vw, 32px)"},children:t.figure}),w.jsx("p",{className:"mt-3 text-[12px] leading-[1.5]",style:{color:"#545454"},children:t.label})]},t.index))})]})})}function IC({module:n}){return w.jsx("section",{className:"alrazah-context mt-12 lg:mt-16 max-w-[760px]",children:w.jsxs("div",{className:"px-6 sm:px-8 py-8 lg:py-10",style:{background:"#F9F8F6",borderLeft:"3px solid #8D0034"},children:[w.jsx("p",{className:"font-bold uppercase tracking-[1.6px] text-[11px] lg:text-[12px] mb-4",style:{color:"#8D0034"},children:n.heading}),w.jsx("p",{className:"text-[16px] lg:text-[17px] leading-[1.7]",style:{color:"#1A1A1A"},children:n.body})]})})}function FC({children:n}){return w.jsx("p",{className:"alrazah-lead font-medium",style:{fontSize:"clamp(17px, 1.8vw, 19px)",lineHeight:1.65,color:"#1A1A1A",marginBottom:"24px"},children:n})}function cc({children:n}){return w.jsx("p",{style:{fontSize:"16px",lineHeight:1.75,color:"#1A1A1A",marginBottom:"24px"},children:n})}function $m({id:n,children:t}){return w.jsx("h2",{id:n,className:"scroll-mt-28 font-bold tracking-[-0.01em]",style:{fontSize:"clamp(22px, 2.4vw, 28px)",lineHeight:1.2,color:"#1A1A1A",marginTop:"36px",marginBottom:"20px"},children:t})}function jC({release:n}){return w.jsxs("article",{className:"alrazah-article",children:[n.sections.map((t,s)=>{const o=t.kind==="lead";return w.jsxs("section",{id:t.anchor,className:"scroll-mt-28",children:[t.heading&&w.jsx($m,{id:t.anchor,children:t.heading}),t.paragraphs.map((a,u)=>o&&u===0?w.jsx(FC,{children:a},u):w.jsx(cc,{children:a},u)),s===1&&w.jsx(LC,{factStrip:n.factStrip}),s===3&&w.jsx(IC,{module:n.contextModule})]},t.id)}),w.jsxs("section",{id:n.aboutAnthropic.anchor,className:"scroll-mt-28 alrazah-about",children:[w.jsx($m,{id:n.aboutAnthropic.anchor,children:n.aboutAnthropic.heading}),n.aboutAnthropic.paragraphs.map((t,s)=>w.jsx(cc,{children:t},s))]}),w.jsx("section",{className:"alrazah-conclusion mt-2",children:n.conclusion.paragraphs.map((t,s)=>w.jsx(cc,{children:t},s))})]})}function DC({toc:n}){const[t,s]=b.useState("");return b.useEffect(()=>{const o=["section-overview","section-series-h-financing","section-commercial-momentum","section-investment-mandate","section-about-anthropic"],a=new IntersectionObserver(u=>{const d=u.filter(h=>h.isIntersecting).sort((h,p)=>p.intersectionRatio-h.intersectionRatio);d[0]&&s(d[0].target.id)},{rootMargin:"-96px 0px -65% 0px",threshold:[0,.25,.5,1]});return o.forEach(u=>{const d=document.getElementById(u);d&&a.observe(d)}),()=>a.disconnect()},[]),w.jsx("div",{className:"hidden xl:block w-[280px] shrink-0",children:w.jsxs("div",{className:"sticky",style:{top:"108px"},children:[w.jsx("p",{className:"font-bold uppercase tracking-[1.6px] text-[11px] mb-4",style:{color:"#8D0034"},children:"On This Page"}),w.jsx("ol",{className:"space-y-1",children:n.map((o,a)=>{`${o.id.replace("about-anthropic","about-anthropic")}`;const u=o.id==="overview"?"section-overview":o.id==="series-h-financing"?"section-series-h-financing":o.id==="commercial-momentum"?"section-commercial-momentum":o.id==="investment-mandate"?"section-investment-mandate":"section-about-anthropic",d=t===u;return w.jsx("li",{children:w.jsxs("a",{href:`#${u}`,className:"block py-2 text-[13px] no-underline transition-colors duration-200",style:{color:d?"#8D0034":"#545454",fontWeight:d?600:500,borderLeft:d?"2px solid #8D0034":"2px solid transparent",paddingLeft:"12px"},children:[w.jsx("span",{style:{color:"#8D0034",marginRight:"8px",fontWeight:700},children:String(a+1).padStart(2,"0")}),o.label]})},o.id)})})]})})}function zo({label:n,href:t,onClick:s,children:o,ariaLabel:a}){return w.jsx("a",{href:t,target:t!=null&&t.startsWith("http")?"_blank":void 0,rel:t!=null&&t.startsWith("http")?"noopener noreferrer":void 0,onClick:s,"aria-label":a||n,className:"inline-flex items-center justify-center w-9 h-9 sm:w-10 sm:h-10 transition-colors duration-200",style:{color:"#1A1A1A",border:"1px solid #E5E5E5",background:"#FFFFFF"},onMouseEnter:u=>{u.currentTarget.style.background="#8D0034",u.currentTarget.style.color="#FFFFFF",u.currentTarget.style.borderColor="#8D0034"},onMouseLeave:u=>{u.currentTarget.style.background="#FFFFFF",u.currentTarget.style.color="#1A1A1A",u.currentTarget.style.borderColor="#E5E5E5"},onFocus:u=>{u.currentTarget.style.outline="2px solid #8D0034",u.currentTarget.style.outlineOffset="2px"},onBlur:u=>{u.currentTarget.style.outline="none"},children:o})}function MC({release:n}){const[t,s]=b.useState(!1),o=typeof window<"u"?window.location.origin+n.canonicalPath:n.canonicalPath,a=async h=>{h.preventDefault();try{await navigator.clipboard.writeText(o),s(!0),setTimeout(()=>s(!1),2200)}catch{}},u=encodeURIComponent(n.title),d=encodeURIComponent(`${n.title} ${o}`);return w.jsxs("section",{className:"alrazah-utilities mt-14 lg:mt-20 pt-8 border-t",style:{borderColor:"#E5E5E5"},children:[w.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-6",children:[w.jsxs("div",{className:"flex items-center gap-4 flex-wrap",children:[w.jsx("span",{className:"font-bold uppercase tracking-[1.6px] text-[11px] lg:text-[12px]",style:{color:"#8D0034"},children:"Share"}),w.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[w.jsx(zo,{label:"LinkedIn",ariaLabel:"Share on LinkedIn",href:`https://www.linkedin.com/sharing/share-offsite/?url=${encodeURIComponent(o)}`,children:w.jsx(Dx,{size:17,strokeWidth:1.75})}),w.jsx(zo,{label:"X",ariaLabel:"Share on X",href:`https://twitter.com/intent/tweet?text=${u}&url=${encodeURIComponent(o)}`,children:w.jsx(Zc,{size:16,strokeWidth:2})}),w.jsx(zo,{label:"Facebook",ariaLabel:"Share on Facebook",href:`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(o)}`,children:w.jsx(Lx,{size:17,strokeWidth:1.75})}),w.jsx(zo,{label:"Email",ariaLabel:"Share by email",href:`mailto:?subject=${u}&body=${d}`,children:w.jsx(Ux,{size:17,strokeWidth:1.75})}),w.jsx(zo,{label:t?"Link copied":"Copy link",ariaLabel:"Copy link",href:"#",onClick:a,children:t?w.jsx(Px,{size:17,strokeWidth:2}):w.jsx(Fx,{size:17,strokeWidth:1.75})})]})]}),w.jsx("div",{className:"flex items-center gap-3",children:w.jsxs("button",{onClick:()=>window.print(),className:"inline-flex items-center gap-2 px-4 py-2.5 text-[13px] font-semibold no-underline transition-colors duration-200",style:{color:"#1A1A1A",border:"1px solid #1A1A1A",background:"transparent"},onMouseEnter:h=>{h.currentTarget.style.background="#1A1A1A",h.currentTarget.style.color="#FFFFFF"},onMouseLeave:h=>{h.currentTarget.style.background="transparent",h.currentTarget.style.color="#1A1A1A"},children:[w.jsx(Hx,{size:16,strokeWidth:1.75}),"Print"]})})]}),w.jsxs("div",{className:"mt-6 flex flex-wrap items-center gap-x-3 gap-y-1 text-[12px]",style:{color:"#545454"},children:[w.jsx("span",{className:"font-semibold",style:{color:"#1A1A1A"},children:n.organization}),w.jsx("span",{style:{color:"#B0B0B0"},children:"·"}),w.jsx("span",{children:n.publicationDate}),w.jsx("span",{style:{color:"#B0B0B0"},children:"·"}),w.jsx("span",{className:"uppercase tracking-[0.1em]",children:n.category})]})]})}function UC({items:n}){return w.jsx("section",{className:"alrazah-related mt-16 lg:mt-20 py-12 lg:py-14",style:{background:"#F9F8F6"},children:w.jsxs("div",{className:"mx-auto w-full max-w-[1280px] px-5 sm:px-8",children:[w.jsxs("div",{className:"flex items-center gap-3 mb-8",children:[w.jsx("span",{className:"block w-8 h-px",style:{background:"#8D0034"}}),w.jsx("p",{className:"font-bold uppercase tracking-[1.6px] text-[12px] lg:text-[13px]",style:{color:"#8D0034"},children:"Related Press Releases"})]}),w.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-px",style:{background:"#E5E5E5"},children:n.map(t=>w.jsxs("a",{href:"#",onClick:s=>s.preventDefault(),className:"group block p-6 lg:p-7 no-underline transition-colors duration-200",style:{background:"#FFFFFF",color:"#1A1A1A"},onMouseEnter:s=>s.currentTarget.style.background="#FCFBFA",onMouseLeave:s=>s.currentTarget.style.background="#FFFFFF",children:[w.jsxs("div",{className:"flex items-center justify-between mb-4",children:[w.jsx("span",{className:"text-[11px] font-bold uppercase tracking-[0.14em]",style:{color:"#8D0034"},children:t.category}),w.jsx("span",{className:"text-[12px] font-medium",style:{color:"#545454"},children:t.date})]}),w.jsx("h3",{className:"font-semibold leading-[1.3] mb-3 transition-colors duration-200",style:{fontSize:"16px",color:"#1A1A1A"},children:t.title}),w.jsx("p",{className:"text-[13px] leading-[1.6] mb-5",style:{color:"#545454"},children:t.excerpt}),w.jsxs("span",{className:"inline-flex items-center gap-1 text-[12px] font-semibold uppercase tracking-[0.1em] transition-transform duration-200 group-hover:translate-x-0.5",style:{color:"#8D0034"},children:["Read release",w.jsx(Og,{size:14,strokeWidth:2.25})]})]},t.title))})]})})}function zC(){return w.jsx("section",{className:"alrazah-cta",style:{background:"#8D0034"},"aria-label":"Stay informed",children:w.jsx("div",{className:"mx-auto w-full max-w-[1280px] px-5 sm:px-8 py-14 lg:py-16",children:w.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-end lg:justify-between gap-8",children:[w.jsxs("div",{className:"max-w-[640px]",children:[w.jsx("p",{className:"font-bold uppercase tracking-[1.8px] text-[12px] lg:text-[13px] mb-4",style:{color:"#FFFFFF",opacity:.85},children:"Stay Informed"}),w.jsx("h2",{className:"font-bold tracking-[-0.01em]",style:{color:"#FFFFFF",fontSize:"clamp(24px, 2.6vw, 32px)",lineHeight:1.2},children:"Follow Alrazah's latest corporate announcements, developments and institutional news."})]}),w.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 shrink-0",children:[w.jsxs(wn,{to:"/news-media/press-releases",className:"inline-flex items-center justify-center gap-2 px-6 py-3.5 text-[14px] font-semibold no-underline transition-colors duration-200",style:{background:"#FFFFFF",color:"#8D0034"},children:["View All Press Releases",w.jsx(Tx,{size:16,strokeWidth:2})]}),w.jsx(wn,{to:"/contact",className:"inline-flex items-center justify-center gap-2 px-6 py-3.5 text-[14px] font-semibold text-white no-underline transition-colors duration-200",style:{border:"1px solid rgba(255,255,255,0.6)"},children:"Contact Alrazah"})]})]})})})}const BC=[{title:"Company",links:[{label:"About Alrazah",path:"/about"},{label:"Our Businesses",path:"/businesses"},{label:"Leadership",path:"/about#leadership"},{label:"Governance",path:"/about#governance"}]},{title:"Investors",links:[{label:"Investor Relations",path:"/investor-relations"},{label:"Annual Reports",path:"/investor-relations#reports"},{label:"Financial Results",path:"/investor-relations#results"},{label:"Share Information",path:"/investor-relations#shares"}]},{title:"News & Media",links:[{label:"Press Releases",path:"/news-media/press-releases"},{label:"Media Centre",path:"/news-media"},{label:"Sustainability",path:"/sustainability"},{label:"Contact",path:"/contact"}]}];function $C(){return w.jsx("footer",{className:"alrazah-footer",style:{background:"#1A1A1A",color:"#FFFFFF"},children:w.jsxs("div",{className:"mx-auto w-full max-w-[1280px] px-5 sm:px-8 pt-14 lg:pt-16 pb-8",children:[w.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-12 gap-10 md:gap-8",children:[w.jsxs("div",{className:"md:col-span-4",children:[w.jsxs("div",{className:"flex items-center gap-3 mb-5",children:[w.jsx("span",{className:"inline-flex items-center justify-center w-10 h-10 text-white font-bold",style:{background:"#8D0034",letterSpacing:"-0.02em"},children:"A"}),w.jsxs("span",{className:"flex flex-col leading-none",children:[w.jsx("span",{className:"font-bold text-[17px] tracking-[0.02em]",children:"ALRAZAH"}),w.jsx("span",{className:"text-[10px] font-medium tracking-[0.28em] mt-1",style:{color:"#8D0034"},children:"Q.P.S.C."})]})]}),w.jsx("p",{className:"text-[13px] leading-[1.7] max-w-[320px]",style:{color:"rgba(255,255,255,0.7)"},children:"Alrazah Q.P.S.C. — a premier publicly listed investment entity on the Qatar Stock Exchange, backing category-defining businesses across global markets."}),w.jsx("p",{className:"text-[12px] mt-6",style:{color:"rgba(255,255,255,0.55)"},children:"Alrazah Tower, West Bay, Doha, State of Qatar"})]}),BC.map(n=>w.jsxs("div",{className:"md:col-span-2",children:[w.jsx("p",{className:"font-bold uppercase tracking-[1.4px] text-[11px] mb-4",style:{color:"rgba(255,255,255,0.85)"},children:n.title}),w.jsx("ul",{className:"space-y-3",children:n.links.map(t=>w.jsx("li",{children:w.jsx(wn,{to:t.path,className:"text-[13px] no-underline transition-colors duration-200",style:{color:"rgba(255,255,255,0.65)"},onMouseEnter:s=>s.currentTarget.style.color="#FFFFFF",onMouseLeave:s=>s.currentTarget.style.color="rgba(255,255,255,0.65)",children:t.label})},t.label))})]},n.title)),w.jsxs("div",{className:"md:col-span-2",children:[w.jsx("p",{className:"font-bold uppercase tracking-[1.4px] text-[11px] mb-4",style:{color:"rgba(255,255,255,0.85)"},children:"Legal"}),w.jsx("ul",{className:"space-y-3",children:["Privacy Policy","Terms of Use","Cookie Policy","Disclaimer"].map(n=>w.jsx("li",{children:w.jsx(wn,{to:"/legal",className:"text-[13px] no-underline transition-colors duration-200",style:{color:"rgba(255,255,255,0.65)"},onMouseEnter:t=>t.currentTarget.style.color="#FFFFFF",onMouseLeave:t=>t.currentTarget.style.color="rgba(255,255,255,0.65)",children:n})},n))})]})]}),w.jsxs("div",{className:"mt-12 pt-6 flex flex-col md:flex-row md:items-center md:justify-between gap-4",style:{borderTop:"1px solid rgba(255,255,255,0.12)"},children:[w.jsxs("p",{className:"text-[12px]",style:{color:"rgba(255,255,255,0.55)"},children:["© ",new Date().getFullYear()," Alrazah Q.P.S.C. All rights reserved."]}),w.jsx("p",{className:"text-[12px]",style:{color:"rgba(255,255,255,0.45)"},children:"Listed on the Qatar Stock Exchange"})]})]})})}const HC={contentType:"corporate_press_release",title:"Alrazah Holding Expands Strategic Backing of Anthropic Through Participation in Record-Breaking $65 Billion Series H Financing",seoTitle:"Alrazah Holding Expands Strategic Investment in Anthropic | Alrazah",metaDescription:"Alrazah Holding expands its strategic investment in Anthropic through participation in the company's $65 billion Series H financing, valuing Anthropic at $965 billion post-money.",publicationDate:"28 May 2026",category:"Press Release",organization:"Alrazah Q.P.S.C.",primaryEntity:"Alrazah Holding",partnerEntities:"Anthropic",location:"Doha, Qatar & San Francisco, USA",dateline:"DOHA, State of Qatar & SAN FRANCISCO, USA – May 28, 2026",slug:"alrazah-holding-expands-strategic-backing-of-anthropic-through-participation-in-record-breaking-65-billion-series-h-financing",canonicalPath:"/news-media/press-release/alrazah-holding-expands-strategic-backing-of-anthropic-through-participation-in-record-breaking-65-billion-series-h-financing/",heroMetadata:{locationLine:"DOHA · QATAR & SAN FRANCISCO · USA",organizationLine:"ALRAZAH HOLDING"},takeaways:{heading:"Key Takeaways",support:"Alrazah Holding expands its strategic investment in Anthropic through participation in the company's $65 billion Series H financing.",items:[{index:"01",label:"Strategic participation",body:"Alrazah Holding participated in Anthropic's $65 billion Series H financing."},{index:"02",label:"Continued investment",body:"The transaction marks the third consecutive funding cycle in which Alrazah Holding has backed Anthropic."},{index:"03",label:"Exceptional scale",body:"The financing values Anthropic at $965 billion on a post-money basis, according to the supplied announcement."},{index:"04",label:"Future-facing mandate",body:"The investment aligns with Alrazah Holding's broader focus on AI, software, advanced computing and digital infrastructure."}]},toc:[{id:"overview",label:"Overview"},{id:"series-h-financing",label:"Series H financing"},{id:"commercial-momentum",label:"Commercial momentum"},{id:"investment-mandate",label:"Investment mandate"},{id:"about-anthropic",label:"About Anthropic"}],sections:[{id:"overview",anchor:"section-overview",heading:null,kind:"lead",paragraphs:["DOHA, State of Qatar & SAN FRANCISCO, USA – May 28, 2026 – Alrazah Holding, a premier publicly listed investment entity on the Qatar Stock Exchange, has officially announced the expansion of its strategic investment in Anthropic, the globally renowned artificial intelligence research and deployment company. This move comes as part of Alrazah Holding's ongoing commitment to backing category-defining technology businesses that shape the global digital economy. The expansion was made through Alrazah Holding's participation in Anthropic's record-breaking $65 billion Series H financing round, which values the AI pioneer at an extraordinary $965 billion post-money valuation."]},{id:"series-h-financing",anchor:"section-series-h-financing",heading:"A Historic Capital Raise to Fuel Global AI Expansion",kind:"body",paragraphs:["The landmark Series H round was led by a premier syndicate of global investors, including sovereign wealth funds, multinational technology conglomerates, and leading institutional asset managers. The $65 billion capital raise represents one of the largest private financing rounds in the history of the technology sector, underscoring the transformative scale and strategic importance of Anthropic's mission to develop safe, beneficial, and economically transformative artificial intelligence.","Alrazah Holding's participation in the Series H round reinforces its position among an elite group of global institutions committed to shaping the trajectory of frontier technologies. The round attracted an exceptionally broad consortium of investors spanning North America, Europe, the Middle East, and Asia, reflecting the worldwide institutional conviction in Anthropic's technological roadmap, governance framework, and commercial momentum.","According to the announcement, the financing values Anthropic at $965 billion on a post-money basis, firmly establishing the company among the most highly valued private enterprises in the world. The scale of the capital raise is intended to accelerate Anthropic's compute infrastructure, expand its frontier model research, and deepen the deployment of its AI systems across enterprise and public-sector markets globally."]},{id:"commercial-momentum",anchor:"section-commercial-momentum",heading:"Demonstrated Commercial Momentum and Market Leadership",kind:"body",paragraphs:["Since Alrazah Holding's initial investment in Anthropic in September 2025, and its subsequent participation in the Series G financing round in February 2026, Anthropic has demonstrated remarkable commercial acceleration. The company's enterprise customer base has expanded materially across regulated industries, public administration, financial services, healthcare, and advanced manufacturing, reflecting the broad cross-sector applicability of its AI systems.","Anthropic's reported annualized run-rate revenue has reached approximately $47 billion, a figure that underscores the rapid commercial adoption of its flagship AI platforms and the deepening integration of its technology into the operational fabric of large enterprises worldwide. The company's growth trajectory reflects sustained demand for AI systems that combine frontier capability with robust safety, interpretability, and governance frameworks.","The continued expansion of Anthropic's commercial footprint has been accompanied by significant advances in model capability, infrastructure efficiency, and the breadth of its enterprise deployment. Alrazah Holding's continued backing reflects its stated conviction in Anthropic's technological leadership and the durability of its commercial model within the global AI landscape."]},{id:"investment-mandate",anchor:"section-investment-mandate",heading:"A Strategic Mandate for Patient Capital and Sustainable Value",kind:"body",paragraphs:["Alrazah Holding's continued participation in this record-breaking round reflects a deliberate, long-term investment philosophy rooted in patient capital and sustainable value creation. The Group's approach to technology investment emphasises the identification of category-defining businesses with durable competitive advantages, defensible technological moats, and the capacity to generate compounding strategic value over extended horizons.","The investment in Anthropic aligns with Alrazah Holding's broader mandate to support enterprises across artificial intelligence, software, advanced computing, and digital infrastructure — sectors that the Group views as foundational to the next generation of global economic growth. This mandate is anchored in a commitment to backing businesses that combine technological leadership with institutional-grade governance and long-term operational discipline.","Through this enduring partnership, Alrazah Holding remains deeply committed to fostering innovation, technological resilience, and sustainable value creation in the rapidly evolving global AI landscape."]}],factStrip:{heading:"At a glance",facts:[{index:"01",figure:"$65 Billion",label:"Anthropic Series H financing"},{index:"02",figure:"$965 Billion",label:"Post-money valuation stated in the release"},{index:"03",figure:"3rd Consecutive Round",label:"Alrazah participation in Anthropic financing"},{index:"04",figure:"28 May 2026",label:"Announcement date"}]},contextModule:{heading:"A Continued Commitment to Frontier Technology",body:"Alrazah Holding's participation in Anthropic's Series H financing extends an established investment relationship and reflects the Group's stated focus on category-defining technology businesses across AI, software, advanced computing and digital infrastructure."},aboutAnthropic:{id:"about-anthropic",anchor:"section-about-anthropic",heading:"About Anthropic",paragraphs:["Anthropic is an AI research and deployment company founded to build reliable, interpretable, and steerable AI systems. The company develops frontier artificial intelligence models and platforms that are deployed by enterprises, governments, and developers across global markets. Anthropic's work is guided by a commitment to AI safety research, responsible scaling, and the development of systems that are aligned with human interests and capable of producing durable economic and societal value."]},conclusion:{paragraphs:["Through this enduring partnership, Alrazah Holding remains deeply committed to fostering innovation, technological resilience, and sustainable value creation in the rapidly evolving global AI landscape."]},related:[{date:"12 February 2026",category:"Press Release",title:"Alrazah Holding Participates in Anthropic Series G Financing Round",excerpt:"Alrazah Holding announces its participation in Anthropic's Series G financing round, reinforcing its strategic commitment to frontier artificial intelligence."},{date:"29 September 2025",category:"Press Release",title:"Alrazah Holding Completes Initial Strategic Investment in Anthropic",excerpt:"Alrazah Holding completes its initial strategic investment in Anthropic, marking the Group's entry into frontier AI as a long-term strategic backer."},{date:"03 March 2026",category:"Press Release",title:"Alrazah Holding Outlines Strategic Technology Investment Mandate",excerpt:"Alrazah Holding details its long-term mandate across AI, software, advanced computing and digital infrastructure as part of its sustainable value strategy."}]};function VC(){const n=HC;return w.jsxs("div",{className:"min-h-screen",style:{background:"#FFFFFF"},children:[w.jsx(AC,{}),w.jsx(PC,{trail:[{label:"Home",path:"/"},{label:"News & Media",path:"/news-media"},{label:"Press Releases",path:"/news-media/press-releases"}],current:"Alrazah Holding Expands Strategic Backing of Anthropic"}),w.jsx(NC,{release:n}),w.jsxs("main",{id:"main",className:"block",children:[w.jsx(OC,{takeaways:n.takeaways}),w.jsx("div",{className:"mx-auto w-full max-w-[1280px] px-5 sm:px-8 pt-10 lg:pt-14 pb-4",children:w.jsxs("div",{className:"flex flex-col xl:flex-row gap-10 lg:gap-14",children:[w.jsxs("div",{className:"min-w-0 flex-1",children:[w.jsx(jC,{release:n}),w.jsx(MC,{release:n})]}),w.jsx(DC,{toc:n.toc})]})}),w.jsx(UC,{items:n.related}),w.jsx(zC,{})]}),w.jsx($C,{})]})}const WC=()=>{const{isLoadingAuth:n,isLoadingPublicSettings:t,authError:s,navigateToLogin:o}=kC();if(t||n)return w.jsx("div",{className:"fixed inset-0 flex items-center justify-center",children:w.jsx("div",{className:"w-8 h-8 border-4 border-slate-200 border-t-slate-800 rounded-full animate-spin"})});if(s){if(s.type==="user_not_registered")return w.jsx(CC,{});if(s.type==="auth_required")return o(),null}return w.jsxs(vE,{children:[w.jsx(Nc,{path:"/news-media/press-release/alrazah-holding-expands-strategic-backing-of-anthropic-through-participation-in-record-breaking-65-billion-series-h-financing/",element:w.jsx(VC,{})}),w.jsx(Nc,{path:"*",element:w.jsx(bC,{})})]})};function qC(){return w.jsx(_C,{children:w.jsxs(dS,{client:_S,children:[w.jsxs(kE,{children:[w.jsx(TC,{}),w.jsx(WC,{})]}),w.jsx(U1,{})]})})}v0.createRoot(document.getElementById("root")).render(w.jsx(qC,{}));